GHSA-4w5h-hx6r-28q7: ratex-parser has unbounded parser recursion that leads to stack overflow (process abort)
The ratex-parser crate has an unbounded recursion vulnerability in its recursive-descent parser, which processes nested LaTeX constructs such as '{', '\left', '\sqrt{', and '^{'. This lack of a maximum recursion depth limit can cause a stack overflow and abort the process. A crafted input with deeply nested groups (~10 KB) can exhaust the main-thread stack, leading to a denial of service. This vulnerability affects versions prior to 0.1.11.
AI Analysis
Technical Summary
RaTeX's parser uses mutual recursion without any depth limit when parsing nested LaTeX expressions, including groups and constructs like '\left' and '\sqrt{'. The recursion consumes one native stack frame per nesting level, and no recursion depth guard is implemented. Consequently, deeply nested inputs cause the Rust process to overflow its stack and abort with SIGABRT, resulting in an unrecoverable denial of service. This issue is exploitable by unauthenticated attackers via a single crafted LaTeX string. The vulnerability affects ratex-parser versions before 0.1.11.
Potential Impact
A single crafted input with deeply nested LaTeX constructs can cause the entire ratex-parser process to crash due to stack overflow. In server-side math rendering services, this leads to a reliable, unauthenticated denial of service. On environments with smaller thread stacks, such as async runtime threads with 512 KB stacks, even smaller inputs can trigger the crash, increasing the attack surface.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, avoid processing untrusted LaTeX input with deeply nested groups or constructs in ratex-parser. Consider limiting input size or nesting depth externally as a temporary mitigation.
GHSA-4w5h-hx6r-28q7: ratex-parser has unbounded parser recursion that leads to stack overflow (process abort)
Description
The ratex-parser crate has an unbounded recursion vulnerability in its recursive-descent parser, which processes nested LaTeX constructs such as '{', '\left', '\sqrt{', and '^{'. This lack of a maximum recursion depth limit can cause a stack overflow and abort the process. A crafted input with deeply nested groups (~10 KB) can exhaust the main-thread stack, leading to a denial of service. This vulnerability affects versions prior to 0.1.11.
CVSS v4.0
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
RaTeX's parser uses mutual recursion without any depth limit when parsing nested LaTeX expressions, including groups and constructs like '\left' and '\sqrt{'. The recursion consumes one native stack frame per nesting level, and no recursion depth guard is implemented. Consequently, deeply nested inputs cause the Rust process to overflow its stack and abort with SIGABRT, resulting in an unrecoverable denial of service. This issue is exploitable by unauthenticated attackers via a single crafted LaTeX string. The vulnerability affects ratex-parser versions before 0.1.11.
Potential Impact
A single crafted input with deeply nested LaTeX constructs can cause the entire ratex-parser process to crash due to stack overflow. In server-side math rendering services, this leads to a reliable, unauthenticated denial of service. On environments with smaller thread stacks, such as async runtime threads with 512 KB stacks, even smaller inputs can trigger the crash, increasing the attack surface.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, avoid processing untrusted LaTeX input with deeply nested groups or constructs in ratex-parser. Consider limiting input size or nesting depth externally as a temporary mitigation.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-4w5h-hx6r-28q7
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-53531"]
- Ecosystems
- ["crates.io"]
- Database Specific Severity
- MODERATE
- Cvss Version
- 4.0
Threat ID: 6a4e4ee9c9d9e3dbe3289c76
Added to database: 07/08/2026, 13:21:45 UTC
Last enriched: 07/08/2026, 13:41:13 UTC
Last updated: 07/09/2026, 02:14:13 UTC
Views: 8
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.