fulgur CSS string-set values can amplify a small PDF job into a memory outage
A PDF conversion service should assume that every incoming document is hostile. fulgur, a Rust library that converts HTML and CSS into PDF, had a failure mode that fits that rule well. A small stylesheet could create a much larger quantity of retained data during rendering.
The issue is CVE-2026-68539. The advisory lists versions from 0.4.4 through 0.28.x as affected and 0.29.0 as the patched release. GitHub rates it High.
The amplification is in the stylesheet
CSS string-set creates named strings that can be read later by generated-content rules. In the affected versions, fulgur resolved the value for each matching element and copied it into stores retained for the render. Values could come from element text, an attribute, or a literal in the stylesheet.
That design creates a breadth multiplier. One literal repeated by a selector that matches many elements becomes many copies in memory. The advisory describes additional cloning downstream, so the memory cost can be several times the apparent size of the input. A document can therefore be modest in bytes while forcing the renderer to hold much more state.
The same work consumes CPU while values are copied. A single request can slow a conversion worker and raise memory pressure for every other tenant using it.
Why a conversion queue is a security boundary
Document conversion is often treated as a formatting utility. It accepts HTML, CSS, fonts and embedded resources, then runs several parsers and layout engines. That combination belongs in a worker with explicit limits, not in the same process that serves account sessions or administrative APIs.
For fulgur deployments, upgrade to 0.29.0 first. Then add limits that reflect the new failure mode: cap input bytes, cap element count, cap string-set expansion in any application-owned preprocessing, and enforce per-job memory and time budgets. A timeout alone helps only if the supervisor can terminate the worker reliably. Health checks should run outside the conversion process so a saturated renderer does not make the service look healthy.
Monitor memory growth by queue, tenant and document type. Keep the last error category without retaining the document itself. If the service offers batch conversion, limit batch size and treat one worker crash as a possible hostile input until logs show otherwise.
Validation after the patch
A clean upgrade test should include a deliberately repeated string-set value with a low production-equivalent memory cap. Verify that the service returns a bounded error or completes within budget. The test should also confirm that the supervisor can kill and replace the worker after a timeout.
Do not use a production conversion host to run an unbounded stress test. Use an isolated environment, capture only timing and memory measurements, and compare results before and after the patch. The advisory establishes the vulnerable code path; your own test establishes whether deployment settings impose a useful limit.
The broader lesson is simple. A size limit on the uploaded file is not a size limit on work. Stylesheet expansion, embedded resources, parsing and layout can multiply that request many times. Treat the multiplier as part of the attack surface.
Top comments (0)