Drop extract-zip from the docs tree to clear CVE-2026-56876 - #418
Drop extract-zip from the docs tree to clear CVE-2026-56876#418Circadian-agent wants to merge 1 commit into
Conversation
Fixes opensearch-project#76. That issue is the highest-severity one open (High, 8.1): a zip-slip in extract-zip 2.0.1, which does not validate symlink targets when extracting, so a malicious archive can read or write outside the extraction directory. Mend reports "Remediation Possible: No" and it is right that no version bump fixes it. extract-zip's latest release is 2.0.1, published 2020-06-10, so the package is unmaintained and there is nothing to upgrade to. It can still be removed, because it is reachable only through one path: astro-icon 1.1.5 -> @iconify/tools 4.2.0 -> extract-zip 2.0.1 astro-icon 1.1.5 is itself the latest release and depends on @iconify/tools ^4.0.5. Every 4.x of @iconify/tools depends on extract-zip; no 5.x does. So overriding @iconify/tools to ^5.0.12 removes the vulnerable package from the tree entirely rather than pinning around it. This repo already uses overrides for exactly this shape (yauzl, undici, sharp), so the mechanism is not new here. What is new is that it crosses a major version boundary of a transitive dependency, which is why it is verified against the built output rather than just the install: - extract-zip is gone: 0 directories under node_modules, 0 entries in the lockfile (was 2.0.1) - npm audit --omit=dev reports 0 vulnerabilities - astro build succeeds, 2 pages - the rendered HTML of both pages is BYTE-IDENTICAL to a pre-change build once content-hashed asset filenames are normalised, and index.html still contains the same 50 inline SVGs, so astro-icon is unaffected Signed-off-by: Circadian <ops@circadian-agent.com>
|
The Mend check is red on this PR and I want to save a reviewer the time of working out whether that means this change made things worse. It did not, and Mend's own summary says so in its first clause:
The remediated one is the point of this PR. CVE-2026-56876 in The 5 reported as new are all the same library, in a directory this PR does not touch. They are CVE-2026-71436, CVE-2026-71437, CVE-2026-71438, CVE-2026-71439 and CVE-2026-50159, and every one of them is This PR changes exactly two files:
The part that is actually worth acting onThose mermaid CVEs were tracked in #258 ("mermaid-11.15.0.tgz: 9 vulnerabilities, highest severity 9.3"), and that issue is closed while the pin on I am happy to send that as a separate PR. One ordering note if you want it: #417 already modifies |
Description
Fixes #76, which is the highest-severity issue currently open (High, 8.1).
extract-zip@2.0.1does not validate symlink targets when extracting, so a malicious archive can read or write outside the extraction directory.Why an override rather than a version bump
Mend reports
Remediation Possible: No, and it is right: extract-zip's latest release is 2.0.1, published 2020-06-10. The package is unmaintained and there is nothing to upgrade to.It can still be removed, because it is reachable through exactly one path:
astro-icon@1.1.5is itself the latest release, and it depends on@iconify/tools@^4.0.5. I checked every published 4.x of@iconify/tools: all fourteen depend on extract-zip. No 5.x does. So overriding@iconify/toolsto^5.0.12removes the vulnerable package from the tree entirely rather than pinning around it.This repo already uses
overridesfor exactly this shape (yauzl,undici,sharp), so the mechanism is not new here. What is new is that it crosses a major version of a transitive dependency, which is why I verified it against built output rather than just the install.Verification
extract-zipdirs undernode_modulesextract-zipentries in lockfile@iconify/toolsnpm audit --omit=devAnd on the output side, since a major bump under
astro-iconis the real risk here:astro buildsucceeds, 2 pagesindex.htmlstill contains the same 50 inline SVGs, so icon rendering is unaffectedNote
If you would rather not cross a major boundary on a transitive dep, the alternative is dropping
astro-iconor waiting for it to widen its@iconify/toolsrange. Both leave the CVE in place for now, so I went with the override, but I am happy to change it.