Heading regex in markdown converter is vulnerable to polynomial backtracking #1

Open
opened 2026-10-16 21:11:33 +00:00 by KofTwentyTwo · 0 comments
KofTwentyTwo commented 2026-10-16 21:11:33 +00:00 (Migrated from github.com)

Code scanning alert #1 (js/polynomial-redos) at packages/publisher/src/markdown/converter.ts:52: ^(#{1,6})\s+(.+)$ backtracks quadratically on long whitespace runs.

Code scanning alert #1 (js/polynomial-redos) at packages/publisher/src/markdown/converter.ts:52: `^(#{1,6})\s+(.+)$` backtracks quadratically on long whitespace runs.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: KofTwentyTwo/Forma#1