Description
BabelDOC from 0.3.61 before 0.7.0 contains a resource exhaustion vulnerability that allows remote attackers to exhaust CPU and memory by supplying unbounded bfrange and cidrange spans. Attackers can submit a crafted PDF whose embedded ToUnicode CMap declares a huge range, driving billions of loop iterations and stalling the translation worker.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| funstory-ai | BabelDOC | 0.3.61 – < 0.7.0 | 0.7.0 |
References
- GitHub Security Advisory (GHSA-wrv8-h9rp-6fqq) vendor-advisory
- https://github.com/funstory-ai/BabelDOC/commit/39a6e9eafeecd39404b94b2f71e88ea058753dd5 patch
- https://github.com/funstory-ai/BabelDOC/blob/main/docs/release-notes/v0.7.0.md release-notes
- https://github.com/funstory-ai/BabelDOC/blob/v0.6.4/babeldoc/pdfminer/cmapdb.py#L378-L389 technical-description
- https://github.com/funstory-ai/BabelDOC/blob/v0.6.4/babeldoc/format/pdf/new_parser/runtime/to_unicode_parser_runtime.py#L150-L158 technical-description
- VulnCheck Advisory: BabelDOC from 0.3.61 before 0.7.0 Denial of Service via ToUnicode CMap Parsing third-party-advisory