Skip to content

Fix parse regex backtracking#296

Open
Hashim1999164 wants to merge 1 commit into
vercel:mainfrom
Hashim1999164:fix-parse-regex-backtracking
Open

Fix parse regex backtracking#296
Hashim1999164 wants to merge 1 commit into
vercel:mainfrom
Hashim1999164:fix-parse-regex-backtracking

Conversation

@Hashim1999164

@Hashim1999164 Hashim1999164 commented Jul 15, 2026

Copy link
Copy Markdown

Summary

  • Tighten the numeric part of the parse regex to avoid ambiguous digit matching.
  • Add coverage for invalid max-length numeric input returning NaN.

Fixes #291.

Test plan

  • pnpm run lint
  • pnpm run typecheck
  • pnpm test

Avoid ambiguous digit matching in parse() so invalid numeric strings fail without excessive regex backtracking.
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.

Security: ReDoS vulnerability in parse regex

1 participant