CVE-2026-53530: Ratex parser Ratex-parser Panics On `\verb` With Vulnerability
HIGHCVE-2026-53530 is a HIGH ratex-parser panics on `\verb` with vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Ratex parser libraries in the crates.io ecosystem. The issue involves ratex-parser panics on `\verb` with a multibyte delimiter (utf-8 byte-boundary slice). Remediation is available by upgrading affected packages to version 0.1.11.
CVE-2026-53530 at a Glance
How to Fix CVE-2026-53530
To remediate this vulnerability, upgrade all affected Ratex parser dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade ratex-parser to 0.1.11
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for ratex-parser
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-53530, inspect your project dependencies for Ratex parser:
inspect dependencies for ratex-parser
Analyze the terminal output to locate any version of Ratex parser in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.1.11), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Ratex parser, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-53530 Affected Ratex parser Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
ratex-parser
|
crates.io |
< 0.1.11
|
0.1.11
|
References
Frequently Asked Questions
What is CVE-2026-53530?
Which Ratex parser versions are affected?
What version fixes CVE-2026-53530?
Is ratex-parser affected?
What CWE is associated with CVE-2026-53530?
How can I check crates.io dependencies for CVE-2026-53530?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4hgp-59h5-gvrj",
"modified" : "2026-07-07T23:39:12Z",
"published" : "2026-07-07T23:39:12Z",
"aliases" : [ "CVE-2026-53530" ],
"summary" : "ratex-parser panics on `\\verb` with a multibyte delimiter (UTF-8 byte-boundary slice)",
"details" : "### Summary\n\nThe public parser entrypoint `ratex_parser::parse(&str)` panics on the **9-byte** input `\\verbéxé` (i.e. `\\verb` followed by the non-ASCII delimiter `é`). When handling a `\\verb` command, the parser slices the verbatim argument with **byte** indices (`arg[1..arg.len() - 1]`); if the delimiter character is multibyte UTF-8, index `1` lands inside that character and Rust panics with *“byte index 1 is not a char boundary”*. Because RaTeX’s release profile sets `panic = \"abort\"` (`Cargo.toml:48`), the panic aborts the **entire process** — not just the current request/thread — making this a hard denial of service for any service that renders untrusted LaTeX.\n\n\n\n### Details\n\n\n## Affected code\n\n`crates/ratex-parser/src/parser.rs`, `parse_symbol_inner`:\n\n```rust\nif let Some(stripped) = text.strip_prefix(\"\\\\verb\") { // parser.rs:901\n self.consume();\n let arg = stripped.to_string(); // e.g. \"éxé\"\n let star = arg.starts_with('*');\n let arg = if star { &arg[1..] } else { &arg }; // parser.rs:905 (also byte-sliced)\n if arg.len() < 2 { // byte length\n return Err(ParseError::new(\"\\\\verb assertion failed\", Some(&nucleus)));\n }\n let body = arg[1..arg.len() - 1].to_string(); // parser.rs:910 <-- PANIC on multibyte delimiter\n ...\n}\n```\n\nFor input `\\verbéxé`: `arg = \"éxé\"`, where `é` = `U+00E9` (bytes `C3 A9`). `arg.len()` is the **byte** length (5), the `< 2` guard passes, and `arg[1..4]` starts at byte index 1 — inside the first `é` (bytes 0..2) — so the slice panics. The lexer groups `\\verb<delim>…<delim>` correctly with char semantics (`lexer.rs` `lex_verb`); only the parser mishandles it.\n\n### PoC\n\n<img width=\"1109\" height=\"205\" alt=\"image\" src=\"https://github.com/user-attachments/assets/cd4bc6ae-23dd-458f-826c-6ce4e85c7005\" />\n\n\n```\n$ printf '\\\\verb\\xc3\\xa9x\\xc3\\xa9\\n' | ./target/release/parse\nthread 'main' panicked at crates/ratex-parser/src/parser.rs:910:27:\nstart byte index 1 is not a char boundary; it is inside 'é' (bytes 0..2 of string)\nAborted (core dumped) # exit 134 — panic=abort kills the whole process\n```\n\n### Impact\n\nAny application that renders untrusted LaTeX through RaTeX (web “render this math” endpoint, WASM in-browser use, the FFI embedded in another app) can be crashed by a tiny string. With `panic = \"abort\"` in release builds, the crash takes down the whole process / server, so a single malicious formula causes a full-service DoS (and, in batch pipelines, drops all queued work).\n\n## Remediation\n\nSlice by character boundaries instead of byte indices, mirroring the UTF-8-correct logic the lexer already uses. For example:\n\n```rust\nlet chars: Vec<char> = arg.chars().collect();\nif chars.len() < 2 { return Err(ParseError::new(\"\\\\verb assertion failed\", Some(&nucleus))); }\nlet body: String = chars[1..chars.len() - 1].iter().collect();\n```\n\n(Apply the same char-aware handling to the `*` strip at `parser.rs:905`.) More broadly, consider not using `panic = \"abort\"` for builds embedded in long-running services, and/or wrapping parsing in `catch_unwind` at the FFI/WASM boundary — but the byte-slice fix is the direct correction.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "ratex-parser"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.1.11"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/erweixin/RaTeX/security/advisories/GHSA-4hgp-59h5-gvrj"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/erweixin/RaTeX"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1285", "CWE-248", "CWE-400" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-07T23:39:12Z",
"nvd_published_at" : null
}
}