fix: guard socketPath with own() to prevent prototype pollution SSRF#10901
Open
nezukoagent wants to merge 1 commit into
Open
fix: guard socketPath with own() to prevent prototype pollution SSRF#10901nezukoagent wants to merge 1 commit into
nezukoagent wants to merge 1 commit into
Conversation
CVE-2026-42264 fix introduced the own() helper to guard config reads, but socketPath and allowedSocketPaths were missed. An attacker who can pollute Object.prototype.socketPath (via another dependency) can redirect all axios requests to a Unix socket (e.g. Docker daemon), enabling SSRF and container escape. Fix: use own('socketPath') and own('allowedSocketPaths') instead of direct config property access. Ref: GHSA-72mg-mc2j-cwf6 Fixes: CVE-2026-42264 (complete)
50c4da6 to
cf258f5
Compare
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
CVE-2026-42264 fix introduced the
own()helper to guard config reads from prototype pollution, butsocketPathandallowedSocketPathswere missed.The Bug
12 other properties use
own()(auth, beforeRedirect, data, transport, insecureHTTPParser, etc.) but socketPath does not.PoC
Impact
Fix
Use
own("socketPath")andown("allowedSocketPaths")instead of directconfig.xxxaccess:References
Summary by cubic
Guards
socketPathandallowedSocketPathswithown()in the HTTP adapter to close a prototype pollution SSRF vector inaxios. Completes CVE-2026-42264 coverage (GHSA-72mg-mc2j-cwf6) by preventing polluted prototypes from redirecting requests to Unix sockets.Bug Fixes
socketPathandallowedSocketPathsviaown()inlib/adapters/http.js; keep type checks and allowlist validation on resolved paths./docs/adapter config forsocketPath,allowedSocketPaths, and setting an explicit allowlist.Testing
socketPathonObject.prototypeis ignored.socketPaththrowsERR_BAD_OPTION_VALUE.socketPathmatchesallowedSocketPaths(string and array).Written for commit cf258f5. Summary will update on new commits. Review in cubic