# CVE-2026-53531: ratex-parser has unbounded parser recursion that leads to stack overflow (process abort)

> An attacker can cause a process crash via stack overflow by submitting deeply nested LaTeX input to the RaTeX library.

- **Severity:** Medium 6.9 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 21 Aug 2026
- **Updated:** 25 Aug 2026
- **Also known as:** GHSA-4w5h-hx6r-28q7

## What is CVE-2026-53531?

CVE-2026-53531 is a medium-severity denial of service vulnerability in erweixin RaTeX, published on 21 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

RaTeX is a KaTeX-compatible math rendering engine written in Rust. Prior to version 0.1.11, RaTeX’s recursive-descent parser recurses one (or more) native stack frame per nesting level at `{`, `\left`, `\sqrt{`, `^{`, etc, with no maximum depth limit. A short, ~10 KB input of nested groups overflows the 8 MB main-thread stack and aborts the process. With `panic = "abort"` (`Cargo.toml:48`), and because a Rust stack overflow is always a fatal `SIGABRT` regardless of panic strategy this is an unrecoverable, whole-process denial of service reachable from a single untrusted LaTeX string. Version 0.1.11 fixes the issue.

Weakness: CWE-674 (Uncontrolled Recursion), CWE-400 (Uncontrolled Resource Consumption)

## Which versions are affected by CVE-2026-53531?

2 open source packages ship an affected version, including ratex-parser.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `ratex-parser` | crates.io | All versions | 0.1.11 |
| `ratex-parser` | crates.io | All versions | 0.1.11 |

## How do I fix CVE-2026-53531?

Upgrade ratex-parser to 0.1.11 or later.

## Is CVE-2026-53531 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-53531 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-53531 and fix it if it is affected.

What it is: CVE-2026-53531 is a medium-severity denial of service vulnerability in erweixin RaTeX, published on 21 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-53531 exists.

Affected packages and fixed versions:
- ratex-parser (crates.io): affected all versions; fixed in 0.1.11
- ratex-parser (crates.io): affected all versions; fixed in 0.1.11

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-53531/ (Markdown: https://insights.sbomify.com/CVE-2026-53531/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-53531
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-53531
- OSV: https://osv.dev/vulnerability/CVE-2026-53531

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-53531/
Summaries are generated and may contain mistakes; the official description above is the record.
