Repository navigation
chore(deps): update dependency serialize-javascript to v7.1.3 [security] - #8714
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
Contributor
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
📊 Benchmark resultsComparing with 4d59b5c
|
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
7.0.5→7.1.3Serialize JavaScript: Cross-site scripting (XSS) via unescaped </script at the end of a serialized function body
CVE-2026-115897 / GHSA-m5mm-p8h7-m29v
More information
Details
Impact
serialize-javascriptescapes its output so it is safe to embed inside a<script>element. Before 7.1.3 that guarantee did not hold for a functionvalue whose source ends in a bare
</script.Each function body is escaped on its own, and a bare
</scriptwas onlyneutralized when followed — within the same body — by a character the HTML
tokenizer treats as ending the tag name (TAB, LF, FF, CR, SPACE,
/or>).A body ending exactly at
</scripthas no following character, so it wasemitted unescaped. The delimiter is then supplied by the surrounding output
(for example the newline the
spaceoption emits after the value), and alater serialized value can supply the closing
>followed by markup:Embedded in a
<script>element, the script ends at the injected tag and the<img>becomes a live element in the page.Exploitation requires an attacker to control the source text of a
serialized function, in practice through a spoofed
toString(). Realfunctions always end in
}, so ordinary function values are not affected,and non-function values (including strings containing
</script) areescaped correctly.
Patches
Fixed in 7.1.3 (#235). The bare
</scriptform is now also matched atthe end of the function body, so it is escaped regardless of what follows it
in the output.
Workarounds
Upgrade to 7.1.3. If you cannot upgrade, do not serialize function values
whose source text (or
toString()) can be influenced by an attacker.Credits
Reported by ha_kr25 via the Yahoo bug bounty program.
Severity
CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
yahoo/serialize-javascript (serialize-javascript)
v7.1.3Compare Source
See: GHSA-m5mm-p8h7-m29v
What's Changed
</scriptat the end of a serialized function body by @redonkulus in #235Note on
ignoreFunctionWith
ignoreFunction: true, function values are now omitted the same wayJSON.stringifyomits them, without deleting them from the input object. Functions inside arrays are emitted asnull(previously this producedArray.prototype.slice.call(...)output).New Contributors
Full Changelog: yahoo/serialize-javascript@v7.1.2...v7.1.3
v7.1.2Compare Source
See: GHSA-gfhx-hw2g-v5hg
v7.1.1Compare Source
What's Changed
</scriptpayload across function bodies by @okuryu in #226Full Changelog: yahoo/serialize-javascript@v7.1.0...v7.1.1
v7.1.0Compare Source
What's Changed
Full Changelog: yahoo/serialize-javascript@v7.0.7...v7.1.0
v7.0.7Compare Source
What's Changed
Full Changelog: yahoo/serialize-javascript@v7.0.6...v7.0.7
v7.0.6Compare Source
What's Changed
Full Changelog: yahoo/serialize-javascript@v7.0.5...v7.0.6
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.