fix(deps): update dependency @tiptap/core to v3.30.5 [security] - #1073
Merged
Conversation
roborev: Combined Review (
|
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.
This PR contains the following updates:
3.30.4→3.30.5Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
Tiptap: Quadratic ReDoS in block and inline Markdown attribute parsing
GHSA-j95f-988m-3j2f
More information
Details
Summary
@tiptap/corecontains two quadratic regular-expression denial-of-service paths in its default Markdown attribute parsers. Pandoc-style block attributes use two unanchored greedy expressions that rescan repeated__QUOTED_0prefixes. Inline shortcode attributes use another unanchored greedy key expression that rescans a long word-character run when no equals sign follows.The public
createAtomBlockMarkdownSpecandcreateBlockMarkdownSpechelpers call the vulnerable Pandoc-style parser;createInlineMarkdownSpeccalls the separately vulnerable shortcode parser. Using unmodified npm 3.29.2, a complete 20,508-byte atom-block token took approximately 1.40 seconds while an equal-length control took 0.29 ms. A complete 32,776-byte inline token took approximately 2.21 seconds while its equal-length control took 0.19 ms. Current repositorymaincommit5158212970344952dd9918b6a44bfb400d7fb6c1retains both expressions.Block attribute root cause
packages/core/src/utilities/markdown/attributeUtils.tsuses bothmatchAllandreplacewith/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g. The candidate is'__QUOTED_0'.repeat(n) + '__QUOTED_0__'. There are no quotes, so the preceding replacement leaves it unchanged. At eachQ, the greedy key-name expression consumes the remaining word-character run, the required equals sign fails, and the unanchored engine restarts at the nextQ. This yieldsO(n^2)work, and the cleanup pass repeats it.A complete public-API proof is:
Measured complete-tokenizer timings were 6.23, 23.12, 88.93, 369.10, and 1,400.17 ms at 1,308, 2,588, 5,148, 10,268, and 20,508 bytes. Equal-length controls took 0.07 to 0.29 ms. The directly exported parser took 5,645.71 ms at 40,972 bytes while its control took 0.64 ms.
Inline attribute root cause
packages/core/src/utilities/markdown/createInlineMarkdownSpec.tsuses/(\w+)=(?:"([^"]*)"|'([^']*)')/g. For a long word-character run without an equals sign,\w+consumes the remaining suffix,=fails, and the unanchored engine restarts at the next character. The default inline tokenizer extracts this attacker string directly from a syntactically complete[shortcode attributes]token.At 1,032, 2,056, 4,104, 8,200, 16,392, and 32,776 bytes, candidates took 3.24, 12.88, 54.82, 136.91, 557.83, and 2,209.47 ms. Equal-length hyphen controls took 0.02 to 0.19 ms.
Impact
Applications parsing attacker-controlled Markdown with these helpers can have a browser main thread, server event loop, or worker blocked by a small input. Persisted documents can repeatedly freeze clients; repeated requests can exhaust server-side parsing capacity. Editors that only consume validated ProseMirror JSON and never invoke the Markdown parsing path are not directly affected through document content.
History and remediation
Commit
35645d94ae9cd73448a564104c2e08f64e9564bcintroduced both parsers on 14 October 2025, first released in 3.7.0. Versions 3.7.0 through current 3.29.2 and currentmainremain affected. Official issue, PR, and repository-advisory searches found no duplicate.Require a start-of-string or whitespace boundary before both key-value parsers, and preferably replace the multi-pass placeholder and shortcode regex designs with deterministic single-pass tokenizers. Keep quoted values out-of-band so attacker input cannot collide with predictable
__QUOTED_n__placeholders. Add complete block and inline Markdown-tokenizer scaling regressions with equal-length controls.Please credit GitHub user
joostgrunwaldas finder/reporter.Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Tiptap: Quadratic ReDoS in block and inline Markdown attribute parsing
GHSA-j95f-988m-3j2f
More information
Details
Summary
@tiptap/corecontains two quadratic regular-expression denial-of-service paths in its default Markdown attribute parsers. Pandoc-style block attributes use two unanchored greedy expressions that rescan repeated__QUOTED_0prefixes. Inline shortcode attributes use another unanchored greedy key expression that rescans a long word-character run when no equals sign follows.The public
createAtomBlockMarkdownSpecandcreateBlockMarkdownSpechelpers call the vulnerable Pandoc-style parser;createInlineMarkdownSpeccalls the separately vulnerable shortcode parser. Using unmodified npm 3.29.2, a complete 20,508-byte atom-block token took approximately 1.40 seconds while an equal-length control took 0.29 ms. A complete 32,776-byte inline token took approximately 2.21 seconds while its equal-length control took 0.19 ms. Current repositorymaincommit5158212970344952dd9918b6a44bfb400d7fb6c1retains both expressions.Block attribute root cause
packages/core/src/utilities/markdown/attributeUtils.tsuses bothmatchAllandreplacewith/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g. The candidate is'__QUOTED_0'.repeat(n) + '__QUOTED_0__'. There are no quotes, so the preceding replacement leaves it unchanged. At eachQ, the greedy key-name expression consumes the remaining word-character run, the required equals sign fails, and the unanchored engine restarts at the nextQ. This yieldsO(n^2)work, and the cleanup pass repeats it.A complete public-API proof is:
Measured complete-tokenizer timings were 6.23, 23.12, 88.93, 369.10, and 1,400.17 ms at 1,308, 2,588, 5,148, 10,268, and 20,508 bytes. Equal-length controls took 0.07 to 0.29 ms. The directly exported parser took 5,645.71 ms at 40,972 bytes while its control took 0.64 ms.
Inline attribute root cause
packages/core/src/utilities/markdown/createInlineMarkdownSpec.tsuses/(\w+)=(?:"([^"]*)"|'([^']*)')/g. For a long word-character run without an equals sign,\w+consumes the remaining suffix,=fails, and the unanchored engine restarts at the next character. The default inline tokenizer extracts this attacker string directly from a syntactically complete[shortcode attributes]token.At 1,032, 2,056, 4,104, 8,200, 16,392, and 32,776 bytes, candidates took 3.24, 12.88, 54.82, 136.91, 557.83, and 2,209.47 ms. Equal-length hyphen controls took 0.02 to 0.19 ms.
Impact
Applications parsing attacker-controlled Markdown with these helpers can have a browser main thread, server event loop, or worker blocked by a small input. Persisted documents can repeatedly freeze clients; repeated requests can exhaust server-side parsing capacity. Editors that only consume validated ProseMirror JSON and never invoke the Markdown parsing path are not directly affected through document content.
History and remediation
Commit
35645d94ae9cd73448a564104c2e08f64e9564bcintroduced both parsers on 14 October 2025, first released in 3.7.0. Versions 3.7.0 through current 3.29.2 and currentmainremain affected. Official issue, PR, and repository-advisory searches found no duplicate.Require a start-of-string or whitespace boundary before both key-value parsers, and preferably replace the multi-pass placeholder and shortcode regex designs with deterministic single-pass tokenizers. Keep quoted values out-of-band so attacker input cannot collide with predictable
__QUOTED_n__placeholders. Add complete block and inline Markdown-tokenizer scaling regressions with equal-length controls.Please credit GitHub user
joostgrunwaldas finder/reporter.Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:NReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Release Notes
ueberdosis/tiptap (@tiptap/core)
v3.30.5Compare Source
@tiptap/core
Patch Changes
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.