chore(deps): update dependency path-to-regexp to v8#5378
Conversation
Up to standards ✅🟢 Issues
|
There was a problem hiding this comment.
Code Review: Dependency Update — path-to-regexp 0.1.13 → 8.4.2
This is a security-driven dependency update scoped entirely to the docs/ package. The changes look correct and appropriate.
What's happening
The PR updates the resolutions override in docs/package.json from path-to-regexp@0.1.13 to 8.4.2. The resolutions field is a Yarn mechanism to force a specific version of a transitive dependency — meaning path-to-regexp is not used directly by the docs site, but by a transitive dependency (e.g., express used by the dev server). The override ensures the vulnerable version isn't pulled in transitively.
The yarn.lock correctly reflects this:
path-to-regexp@~0.1.12is still present (retained for other transitive dependencies that specify that range)path-to-regexp@8.4.2is added as the new forced resolution
Security context
The jump to v8.4.0+ fixes two CVEs:
Both involve wildcard backtracking vulnerabilities in route matching — significant issues for any HTTP routing use.
Potential concern (low risk here)
The API between v0.x and v8.x of path-to-regexp changed significantly. However, since this is a resolutions override on a transitive dependency (not a direct usage), any direct API consumers in the dep tree would be relying on the old API. This could cause a runtime mismatch if the transitive dep (e.g., an older version of express's router) calls the v0.x API but gets the v8.x module.
That said, this is a docs site used only during local dev/build — the blast radius is minimal and this is the correct approach to eliminate the vulnerability from the dependency graph.
Verdict
Approved. This is a well-scoped security dependency update. The yarn.lock changes are consistent with the intent. Given the CVE severity and that this only affects the docs toolchain, the update is appropriate to merge.
There was a problem hiding this comment.
Approved. Security update for path-to-regexp (CVE-2026-4926, CVE-2026-4923), scoped to docs toolchain only. Changes are correct — yarn.lock is consistent with the resolutions override.
725b9f3 to
bc6b57b
Compare
There was a problem hiding this comment.
Code Review: path-to-regexp v0.1.13 → v8.4.2
This is a Renovate-generated security update scoped entirely to the docs/ directory. The changes are correct and well-scoped.
What the PR does
Updates the resolutions override in docs/package.json to force path-to-regexp@8.4.2 for the express transitive dependency. This is the right approach — rather than pinning the package globally (which could break other transitive consumers on different semver ranges), the resolution is scoped as express/path-to-regexp, meaning Yarn only forces the newer version when express is the requester.
Security fix context
v8.4.0 addressed two CVEs:
- CVE-2026-4926 (GHSA-j3q9-mxjg-w52f) — wildcard backtracking allowing ReDoS
- CVE-2026-4923 (GHSA-27v5-c462-wpq7) — large optional route combinations causing regex explosion
These are ReDOS vulnerabilities with potentially serious impact in server environments. Even though this only affects the docs toolchain, eliminating the vulnerability from the dependency graph is the right call.
yarn.lock analysis
The lock file changes are consistent with the intent:
path-to-regexp@~0.1.12entry is retained (other transitive deps still request this range)path-to-regexp@3.3.0entry is unchanged (unrelated dep)path-to-regexp@8.4.2is added as the new resolved version for the express resolution
One minor observation: the old path-to-regexp@0.1.13 entry previously served double duty (matching both the bare 0.1.13 pin and ~0.1.12). After this change it only matches ~0.1.12. This is correct behavior since the 0.1.13 explicit pin was the old resolution override that's now been replaced.
API compatibility note
The v0.x → v8.x jump is a significant API overhaul, but since this is a resolutions override rather than a direct dependency, this only matters if a transitive dep calls path-to-regexp's public API directly. In the context of Docusaurus/express dev tooling for a docs site, the runtime risk is minimal.
Verdict
Approved. Clean, well-scoped security update. No concerns with the implementation.
Pull request was closed
bc6b57b to
b0da3ab
Compare
There was a problem hiding this comment.
Code Review: chore(deps): update dependency path-to-regexp to v8
This is a Renovate Bot-generated dependency update for the docs/ directory, bumping path-to-regexp from 1.9.0 → 8.4.2 as a security resolution override.
Summary
The change is minimal and correct:
docs/package.json: updates theresolutionsentry forexpress/path-to-regexpfrom1.9.0to8.4.2docs/yarn.lock: updated lock file entries accordingly, preserving the^1.7.0and~0.1.12entries untouched (they resolve to different version pins)
Security Significance
This update is specifically important — v8.4.0 fixes two CVEs:
Both are related to wildcard backtracking (ReDoS vectors). Updating to 8.4.2 patches these and also includes additional performance improvements (~20-25% parse/compile speedup) and a smaller bundle size.
Assessment
The scope is correctly limited to the docs/ subdirectory — this is a dev/docs tooling dependency, not part of the core TUnit .NET library. The yarn.lock correctly retains path-to-regexp@1.9.0 as a direct dependency resolution for packages that explicitly require ^1.7.0 (the resolution override only forces the express/path-to-regexp path to 8.4.2).
No concerns. This is a straightforward, well-scoped security dependency bump. Approved.
This PR contains the following updates:
1.9.0→8.4.2Release Notes
pillarjs/path-to-regexp (path-to-regexp)
v8.4.2Compare Source
Fixed
9a78879Performance
937c02d57247e65844988Bundle size to 1.93 kB, from 1.97 kB.
v8.4.1Compare Source
Fixed
6bc8e84/*foowith/a/b=/a/*foo.htmlwith/a/b.html/c.html=/a/b.html5bcd30b/:"a"_:"b"against/foo__. This makes intuitive sense because the second parameter is not going to backtrack on_anymore, but it's somewhat unexpected since there's no reason it shouldn't match the second_.v8.4.0Compare Source
Important
Fixed
Changed
/users{/delete}it will restrict the number of generated combinations to < 256, equivalent to 8 top-level optional groups and unlikely to occur in a real world application, but avoids exploding the regex size for applications that accept user created routesv8.3.0Compare Source
Changed
2a7f2a4TokenData(#391)687a9bba4a8552a6bdf40Other
9df24484a91505d63f44b973d15cv8.2.0Compare Source
Fixed
path-to-regexpto run on older browsers by targeting ES20155969033sflag from regexp51dbd45v8.1.0Compare Source
Added
pathToRegexpmethod back for generating a regexstringifymethod for convertingTokenDatainto a path stringv8.0.0: Simpler APICompare Source
Heads up! This is a fairly large change (again) and I need to apologize in advance. If I foresaw what this version would have ended up being I would not have released version 7. A longer blog post and explanation will be incoming this week, but the pivot has been due to work on Express.js v5 and this will the finalized syntax used in Express moving forward.
Edit: The post is out - https://blakeembrey.com/posts/2024-09-web-redos/
Added
*namesyntax, aligns with:behavior but using an asterisk insteadChanged
?,+, and*- only optional exists moving forward (use wildcards for+,{*foo}for*)Added
:"foo-bar"string | TokenData | Array<string | TokenData>Removed
loosemodev7.2.0: Support array inputs (again)Compare Source
Added
matchandpathToRegexp3fdd88fv7.1.0: Strict modeCompare Source
Added
strictoption to detect potential ReDOS issuesFixed
suffix + prefixwhen not specifiedTokenDataTokenDatamanually, previouslyparsefilled it in automaticallyComments
strict: trueand I'm probably releasing a V8 with it enabled by default ASAP as a necessary security mitigationv7.0.0: Wildcard, unicode, and modifier changesCompare Source
Hi all! There's a few major breaking changes in this release so read carefully.
Breaking changes:
compileonly accepts strings as values (i.e. no numbers, useString(value)before compiling a path)encode !== false, it must be an array of strings\p{XID_Continue}).?,*,+) must be used after a param explicitly wrapped in{}/or.*) has been added back and matches Express.js expected behaviorendsWithoptionstrict: truetotrailing: false;,,,!, and@for future use-casestokensToRegexp,tokensToFunctionandregexpToFunctionin favor of simplifying exports/can be repeated multiple times in a matched path (i.e./fooworks like//foo, etc)encodeanddecodeno longer receive the token as the second parameterencodeURIComponentand decode defaults todecodeURIComponentAdded:
encodePathto fix an issue aroundencodebeing used for both path and parameters (the path and parameter should be encoded slightly differently)looseas an option to support arbitrarily matching the delimiter in paths, e.g.foo/barandfoo///barshould work the sameencodeanddecodeto be set tofalsewhich skips all processing of the parameters input/outputTokenData(exported, returned byparse) as inputRequests for feedback:
{}is an obvious drawback but I'm seeking feedback on whether it helps make path behavior clearer/and.as implicit prefixesv6.3.0: Fix backtracking in 6.xCompare Source
Fixed
f1253b4v6.2.2: Updated READMECompare Source
No API changes. Documentation only release.
Changed
c7ec332e828000v6.2.1: Fix matching:name*parameterCompare Source
Fixed
:name*parameter (#261)762bc6b86baef8Added
ae9e57677df638b39edd4v6.2.0: Named Capturing GroupsCompare Source
Added
Fixed
strictflag documentation (#227)v6.1.0: Use/#?as Default DelimiterCompare Source
Fixed
/#?as default delimiter to avoid matching on query or fragment parametersdelimiter: '.'v6.0.0: Custom Prefix and Suffix GroupsCompare Source
This release reverts the prefix behavior added in v3 back to the behavior seen in v2. For the most part, path matching is backward compatible with v2 with these enhancements:
/(abc(?=d))/{abc(.*)def}/test(foopreviously worked treating(as a literal character, now it expects(to be closed and is treated as a group/test\(fooChanged
prefixesoption to configure this (starts as/.which acts like every version since 0.x again){}to capture prefix/suffix explicitly, enables custom use-cases like/:attr1{-:attr2}?v5.0.0: Remove Default Encode URI ComponentCompare Source
No changes to path rules since 3.x, except support for nested RegEx parts in 4.x.
Changed
RegexpOptionsinterface toTokensToRegexpOptionsnormalizePathnamefrom library, document solution in READMEencodeURIComponentv4.0.5: Decode URICompare Source
Removed
whitelistin favor ofdecodeURI(advanced behavior can happen outsidepath-to-regexp)v4.0.4: RemoveString#normalizeCompare Source
Fixed
String.prototype.normalizeto continue supporting IEv4.0.3: Normalize Path WhitelistCompare Source
Added
/%.-)v4.0.2: AllowRegexpOptionsinmatchCompare Source
Fixed
RegexpOptionsinmatch(...)functionv4.0.1: Fix Spelling of RegexpCompare Source
Fixed
regexpspelling across 4.xv4.0.0: ES2015 Package for BundlersCompare Source
All path rules are backward compatible with 3.x, except for nested
()and other RegEx special characters that were previously ignored.Changed
matchdoes not default todecodeURIComponentAdded
normalizePathnameutility for supporting unicode paths in librariesv3.3.0: Add backtracking protectionCompare Source
Fixed
d31670av3.2.0: Match FunctionCompare Source
Added
matchfunction to libraryv3.1.0: Validate and sensitive optionsCompare Source
sensitiveoption fortokensToFunction(#191)validateoption to path functions (#178)v3.0.0Compare Source
/:att1-:att2-:att3-:att4-:att5)partialsupport, prefer escaping the prefix delimiter explicitly (e.g.\\/(apple-)?icon-:res(\\d+).png)v2.4.0Compare Source
startoption to disable anchoring from beginning of the stringv2.3.0Compare Source
delimiterwhen processing repeated matching groups (e.g.foo/barhas no prefix, but has a delimiter)v2.2.1Compare Source
end: falseto match both relative and absolute pathsv2.2.0Compare Source
tokenas second argument toencodeoption (e.g.encode(value, token))v2.1.0Compare Source
/foo/before required either/foo/or/foo//to match in non-ending modev2.0.0Compare Source
endsWithto match paths like/test?query=stringup to the query stringdelimitersfor specific characters to be treated as parameter prefixes (e.g./:test)isarraydependency/test/is now treated as/test/instead of/testwhen matching)keysargument that acceptedoptionskeyslist attached to theRegExpoutputtokensToFunction(e.g.compile) to accept anencodefunction for pretty encoding (e.g. pass your own implementation)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 has been generated by Renovate Bot.