fix: pin form-data >=4.0.6 to patch CRLF injection #65
Merged
angelocordon merged 2 commits intoJul 7, 2026
Conversation
angelocordon
merged commit Jul 7, 2026
3e7209e
into
fix/secvuln-46269-shell-quote
1 of 2 checks passed
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.
Summary
Adds a
pnpm.overridesentry to forceform-datato>=4.0.6, resolving a CRLF injection vulnerability in all resolved instances of the package.Root cause
form-datathrough v4.0.5 concatenated thefieldname andfilenameoption directly into theContent-Dispositionheader with no escaping of\r,\n, or". An application passing untrusted input as a field name or filename could allow an attacker to inject headers or smuggle additional multipart parts. Fixed inform-data@4.0.6by percent-encoding those characters, matching the WHATWG HTMLmultipart/form-dataencoding algorithm.Transitive dependency chain
Why
pnpm.overridesis necessaryform-datais two hops deep underaxios, which is itself a transitive dependency. Upgrading@openapitools/openapi-generator-cli(done in the base PR #64) did not change theaxiosversion or itsform-dataspecifier. There is no direct dependency to upgrade through;pnpm.overridesis the pnpm-idiomatic mechanism for exactly this scenario.Scope
This repo never imports
form-datadirectly — it is only present as a transitive dev dependency. There is no production exposure.Stacked on
This PR is stacked on top of #64. Once #64 merges, this PR's base can be retargeted to
mainand the diff will show only thepnpm.overridesaddition.Files changed
package.json— addspnpm.overridesblock (3 lines)pnpm-lock.yaml— regenerated;form-data@4.0.5replaced byform-data@4.0.6throughoutRevert plan
Reverting this PR fully restores the previous state. No database migrations, feature flags, or infrastructure changes are involved.
PCI review checklist
I have documented a clear reason for, and description of, the change I am making.
If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.
If applicable, I've documented the impact of any changes to security controls.
This PR is a security control improvement: it pins a transitive dev dependency to its patched version, eliminating a known CRLF injection vulnerability (GHSA-hmw2-7cc7-3qxx / SECVULN-46679) from the dependency graph.