Skip to content

fix(security): bump braces to 3.0.3 — ReDoS (SDK-6068)#82

Open
AakashHotchandani wants to merge 1 commit into
masterfrom
security/SDK-6068-braces
Open

fix(security): bump braces to 3.0.3 — ReDoS (SDK-6068)#82
AakashHotchandani wants to merge 1 commit into
masterfrom
security/SDK-6068-braces

Conversation

@AakashHotchandani
Copy link
Copy Markdown
Collaborator

@AakashHotchandani AakashHotchandani commented May 27, 2026

Summary

Remediates SDK-6068braces ReDoS (GHSA-grv7-fg5c-xmjg, CWE-400, CVSS 6.5).

braces@3.0.2 (< 3.0.3) is vulnerable to uncontrolled resource consumption: a malformed brace expression triggers catastrophic backtracking that hangs the process. It's reachable transitively here (nightwatch → chokidar → braces) and is used during nightwatch test-path glob expansion. In CI, if an attacker can influence the test path (chains with the commit_sha vector), the runner can be hung — pipeline DoS.

Change (lockfile-only, surgical)

The lockfile is lockfileVersion: 1; rather than migrate the whole file to v3, this is a targeted 2-entry edit:

  • braces 3.0.2 → 3.0.3 (its requires floor moves to fill-range ^7.1.1)
  • fill-range 7.0.1 → 7.1.1 (braces 3.0.3's pinned dependency; to-regex-range ^5.0.1 dep unchanged; braces is its only consumer)

Patch-level bump, non-breaking, no package.json change needed.

Verification

  • npm ci against the edited lockfile succeeds (proves the lockfile is internally consistent).
  • npm ls braces resolves braces@3.0.3 / fill-range@7.1.1 — vulnerable braces@3.0.2 is gone.
  • Diff: package-lock.json only, 7 ins / 7 del.

Jira: SDK-6068

🤖 Generated with Claude Code

braces < 3.0.3 is vulnerable to uncontrolled resource consumption (ReDoS)
via malformed brace expansion — GHSA-grv7-fg5c-xmjg (CWE-400, CVSS 6.5).
It reaches this repo transitively (nightwatch -> chokidar -> braces) and is
used during nightwatch test-path glob expansion.

Surgical lockfile-only edit (lockfileVersion 1 preserved):
- braces 3.0.2 -> 3.0.3 (requires fill-range ^7.1.1)
- fill-range 7.0.1 -> 7.1.1 (braces 3.0.3's pinned dependency; to-regex-range
  dep unchanged)

Verified: `npm ci` succeeds against the edited lockfile and resolves
braces@3.0.3 / fill-range@7.1.1 — vulnerable braces@3.0.2 is gone.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@AakashHotchandani AakashHotchandani requested a review from a team as a code owner May 27, 2026 10:41
@AakashHotchandani
Copy link
Copy Markdown
Collaborator Author

🤖 Automated review (pr-review agent)

Verdict: ✅ Approve — Risk: Low · 0 critical · 0 warnings · 2 informational follow-ups.

Surgical lockfileVersion-1 edit verified correct and internally consistent:

  • Integrity hashes & resolved URLs for braces@3.0.3 and fill-range@7.1.1 match the npm registry byte-for-byte.
  • braces's requires floor correctly raised to fill-range ^7.1.1; fill-range's to-regex-range ^5.0.1 left unchanged.
  • Transitive tree stays consistent — chokidar's ~3.0.2 admits 3.0.3, braces is fill-range's only consumer, no stale pins elsewhere. The 2-entry edit is complete.
  • Keeping lockfileVersion 1 (vs migrating to v3) is the right minimal call for a CVE patch.
  • Vulnerable braces@3.0.2 is gone (npm ci resolves 3.0.3).

Per-file confidence: package-lock.json → 🟢 All Clear (objectively verified against npm registry).

Informational follow-ups (not blockers): a deliberate v1→v3 lockfile migration on a separate PR; enable Dependabot (now added in #83) to automate future transitive bumps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant