chore(deps): update ws and path-to-regexp security fixes#41446
Draft
gateway wants to merge 1 commit into
Draft
Conversation
Author
|
@microsoft-github-policy-service agree |
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.
10-second summary
This PR updates
wsfrom8.17.1to8.21.0and refreshes the resolvedpath-to-regexplockfile entry from8.3.0to8.4.2to remove two high-severity denial-of-service advisories from the resolved dependency graph.wsis directly listed in the root dev dependency set and is imported by Playwright runtime/server code;path-to-regexpis transitive throughrouter.No user-facing behavior change is expected. The change is limited to dependency resolution in
package.jsonandpackage-lock.json;npm auditno longer reports high-severity findings forwsorpath-to-regexp.What Changed
wsfrom8.17.1to8.21.0.package-lock.jsonsopath-to-regexpresolves from8.3.0to8.4.2.What Users Will See
No direct user-facing behavior change is expected. This is preventive dependency remediation for resolved Node dependencies used by the repo.
Surface Area
Notes: dependency resolution only; no Playwright API or behavior changes are intended.
Why This Change Is Needed
This PR addresses high-severity advisories affecting the resolved dependency graph:
ws@8.17.1is affected by a memory exhaustion DoS advisory fixed in8.21.0.ws@8.17.1is also below the patched range for an uninitialized memory disclosure advisory fixed in8.20.1.path-to-regexp@8.3.0is affected by ReDoS/DoS advisories fixed in8.4.0+; this PR resolves it to8.4.2.This matters when attacker-controlled websocket data or route patterns can reach the vulnerable packages. This PR is not claiming active exploitation in this repository.
Advisory References
wsmemory exhaustion DoS: GHSA-96hv-2xvq-fx4pwsadvisory: GHSA-96hv-2xvq-fx4pwsuninitialized memory disclosure: GHSA-58qx-3vcg-4xpxwsadvisory: GHSA-58qx-3vcg-4xpxpath-to-regexpDoS: GHSA-j3q9-mxjg-w52fpath-to-regexpadvisory: GHSA-j3q9-mxjg-w52fpath-to-regexp: https://nvd.nist.gov/vuln/detail/CVE-2026-4926Where It Appears
Dependency path:
Evidence:
package.json: root dependency now pinswsto8.21.0.package-lock.json: root lockfile dependency now recordswsas8.21.0.package-lock.json: resolvedpath-to-regexppackage is now8.4.2.package-lock.json: resolvedwspackage is now8.21.0.Generated dependency sidecars:
package-lock.json: updated.Code Usage Review
Direct vulnerable package imports:
wsfound;path-to-regexpnot directly imported in source checked.Direct parent package imports:
routernot directly imported in source checked.Observed exposure:
wsis runtime-linked;path-to-regexpis transitive tooling/dependency-graph exposure.Examples of
wsusage:packages/playwright-core/src/utilsBundle.tspackages/playwright-core/src/server/transport.tspackages/utils/wsServer.tsFix
This PR updates dependency resolution so the affected packages resolve to patched versions.
Affected:
ws@8.17.1path-to-regexp@8.3.0Patched:
ws >= 8.21.0for GHSA-96hv-2xvq-fx4pws >= 8.20.1for GHSA-58qx-3vcg-4xpxpath-to-regexp >= 8.4.0for GHSA-j3q9-mxjg-w52fTarget used:
ws@8.21.0path-to-regexp@8.4.2Alternatives Considered
ws: rejected becausenpm auditstill reported the highpath-to-regexpfinding and the transitive lockfile refresh is small.npm audit fix: rejected to avoid unrelated dependency churn.Risk Assessment
Upgrade risk: low to medium.
Reasoning:
wsstays within the same major version and is pinned exactly to the patched release.path-to-regexpstays within the existingroutersemver range and changes only the lockfile resolution.wsis runtime-linked in Playwright internals.Validation
Ran:
npm audit --json: high-severity findings forwsandpath-to-regexpare no longer reported; remaining findings are lower-priority unrelated items.wsandpath-to-regexpare no longer present in the post-fix top package findings.git diff --check: passed.Suggested maintainer validation:
Notes
This PR is not claiming active exploitation in this repo. It removes known vulnerable dependency versions from the resolved dependency graph and documents the scope of the change.
Powered by Guardian: https://github.com/gateway/guardian