chore(deps): update dependency diff to v8.0.3 [security]#6508
chore(deps): update dependency diff to v8.0.3 [security]#6508renovate[bot] wants to merge 1 commit intomainfrom
Conversation
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
View your CI Pipeline Execution ↗ for commit 733692e
☁️ Nx Cloud last updated this comment at |
0d7c476 to
21865c4
Compare
1712c37 to
a1ea407
Compare
a1ea407 to
410a670
Compare
815904a to
3c9ee04
Compare
3c9ee04 to
2ecbcfa
Compare
🚀 Changeset Version PreviewNo changeset entries found. Merging this PR will not cause a version bump for any packages. |
7f92497 to
2b4ff76
Compare
2b4ff76 to
04cbc50
Compare
68559be to
490d326
Compare
6e2e484 to
81be7f7
Compare
f32050a to
28d2625
Compare
28d2625 to
150ff3c
Compare
150ff3c to
821a7b9
Compare
821a7b9 to
527547f
Compare
527547f to
e72010a
Compare
99327ba to
ae34c94
Compare
ae34c94 to
851dd2d
Compare
851dd2d to
8ab01b9
Compare
There was a problem hiding this comment.
Important
At least one additional CI pipeline execution has run since the conclusion below was written and it may no longer be applicable.
Nx Cloud has identified a possible root cause for your failed CI:
This CI failure appears to be related to the environment or external dependencies rather than your code changes.
No code changes were suggested for this issue.
Trigger a rerun:
🎓 Learn more about Self-Healing CI on nx.dev
8ab01b9 to
733692e
Compare
There was a problem hiding this comment.
Nx Cloud has identified a possible root cause for your failed CI:
We investigated the CI failures and found they are pre-existing TypeScript type incompatibility errors unrelated to this diff package security patch. The same failures reproduce identically in branch 6614, confirming they were not introduced by this PR. Our recommendation is to merge this security update and address the type errors separately.
No code changes were suggested for this issue.
Trigger a rerun:
🎓 Learn more about Self-Healing CI on nx.dev
This PR contains the following updates:
8.0.2→8.0.3jsdiff has a Denial of Service vulnerability in parsePatch and applyPatch
CVE-2026-24001 / GHSA-73rr-hh4g-fpgx
More information
Details
Impact
Attempting to parse a patch whose filename headers contain the line break characters
\r,\u2028, or\u2029can cause theparsePatchmethod to enter an infinite loop. It then consumes memory without limit until the process crashes due to running out of memory.Applications are therefore likely to be vulnerable to a denial-of-service attack if they call
parsePatchwith a user-provided patch as input. A large payload is not needed to trigger the vulnerability, so size limits on user input do not provide any protection. Furthermore, some applications may be vulnerable even when callingparsePatchon a patch generated by the application itself if the user is nonetheless able to control the filename headers (e.g. by directly providing the filenames of the files to be diffed).The
applyPatchmethod is similarly affected if (and only if) called with a string representation of a patch as an argument, since under the hood it parses that string usingparsePatch. Other methods of the library are unaffected.Finally, a second and lesser bug - a ReDOS - also exhibits when those same line break characters are present in a patch's patch header (also known as its "leading garbage"). A maliciously-crafted patch header of length n can take
parsePatchO(n³) time to parse.Patches
All vulnerabilities described are fixed in v8.0.3.
Workarounds
If using a version of jsdiff earlier than v8.0.3, do not attempt to parse patches that contain any of these characters:
\r,\u2028, or\u2029.References
PR that fixed the bug: https://github.com/kpdecker/jsdiff/pull/649
CVE Notes
Note that although the advisory describes two bugs, they each enable exactly the same attack vector (that an attacker who controls input to
parsePatchcan cause a DOS). Fixing one bug without fixing the other therefore does not fix the vulnerability and does not provide any security benefit. Therefore we assume that the bugs cannot possibly constitute Independently Fixable Vulnerabilities in the sense of CVE CNA rule 4.2.11, but rather that this advisory is properly construed under the rules as describing a single Vulnerability.Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:UReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
kpdecker/jsdiff (diff)
v8.0.3Compare Source
Intl.SegmenterwithdiffWords. This has been almost completely broken since the feature was added in v6.0.0, since it would outright crash on any text that featured two consecutive newlines between a pair of words (a very common case).diffWordswhen used without anIntl.Segmenter. Specifically, the soft hyphen (U+00AD) is no longer considered to be a word break, and the multiplication and division signs (×and÷) are now treated as punctuation instead of as letters / word characters.createPatchetc. patches can now be customised somewhat. It now takes aheaderOptionsoption that can be used to disable the file headers entirely, or omit theIndex:line and/or the underline. In particular, this was motivated by a request to make jsdiff patches compatible with react-diff-view, which they now are if produced withheaderOptions: FILE_HEADERS_ONLY.parsePatchwhereby adversarial input could cause a memory-leaking infinite loop, typically crashing the calling process. Also fixed ReDOS vulnerabilities whereby adversarially-crafted patch headers could take cubic time to parse. Now,parsePatchshould reliably take linear time. (Handling of headers that include the line break characters\r,\u2028, or\u2029in non-trailing positions is also now more reasonable as side effect of the fix.)Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, 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.