- Severity: HIGH
- CVE: CVE-2026-68538
- Ecosystems: rust
- Packages: fulgur
`fulgur` converts untrusted HTML/CSS into PDF, commonly on a server that processes input supplied by many tenants. In versions from 0.15.0 up to (but not including) the patched release, resolving the CSS `counters(name, sep)` function in generated content was bounded neither in the size of a single expansion nor in the aggregate work across an element tree.
A CSS counter chain grows by one entry per `counter-reset`, and per CSS Lists 3 §4.4 a reset is scoped to the originating element, its descendants, and its following siblings — so among N sibling elements the i-th element’s active chain has about `i` entries. `counters(name, sep)` joins that chain with an attacker-controlled separator string, and each matching element emits its own resolved copy. A document such as:
“`html
“`
therefore expands to roughly `separator_len × N² / 2` bytes of generated content from a few kilobytes of input — a super-linear amplification. The same `counters()` resolution feeds three sinks: the generated CSS injected for `::before` / `::after`, the PDF outline built from `bookmark-label`, and the per-node counter-state snapshots retained during resolution (the last is an O(N²) **memory** sink even when it produces no visible output). An attacker able to submit HTML/CSS to a fulgur-based conversion service can trigger CPU and memory exhaustion with a trivially small payload, denying service to the host and any co-tenants.
## Patches
Fixed in **0.27.0**. Each single `counters()` expansion i…
Source: GitHub Security Advisories · 2026-12-04