{"id":"CVE-2026-68539","aliases":["GHSA-vw2v-g4x7-xcqg"],"url":"https://o3.security/vulnerability/CVE-2026-68539","summary":"fulgur: Unbounded string-set value accumulation causes memory/CPU exhaustion (denial of service)","details":"`fulgur` converts untrusted HTML/CSS into PDF, commonly on a server that\nprocesses input supplied by many tenants. In versions from 0.4.4 up to (but not\nincluding) the patched release, the CSS `string-set` named-string values\nresolved from a document were accumulated per element with no memory budget,\nletting a small crafted document amplify into large retained memory (and the CPU\nto copy it) — a denial of service.\n\nA `string-set` value is attacker-controlled: it is resolved from an element's\nown text (`content(text)`), from one of its attributes (`attr(...)`), or from a\nCSS string literal. fulgur accumulated these values per element in two unbounded\nplaces:\n\n1. **Store (default path).** For every element that matches a `string-set` rule,\n   fulgur pushes a copy of the resolved value into a store that is retained for\n   the whole render and cloned again downstream into a per-node lookup map. This\n   happens on the ordinary render path with no opt-in. A single literal reused\n   across many elements therefore expands from one copy in the input to N copies\n   in memory:\n\n   ```html\n   <style>\n     p { string-set: title \"……a large literal value……\" }\n   </style>\n   <p></p>  <!-- repeated N times -->\n   ```\n\n   The store grows to roughly `value_size × N` bytes (and ~3× that across the\n   downstream clones) from an input whose large part appears only once — a\n   breadth-unbounded amplification.\n\n2. **Per-node snapshot (bookmark / cross-reference path).** When PDF bookmarks\n   (`bookmark-label: string(...)`) or CSS `target-*` references are in play,\n   fulgur additionally cloned the full running `name → value` map at every\n   visited element so `string()` can resolve at that position. One large value\n   is then re-cloned at each of N following elements — an `O(N × value_size)`\n   retained-memory sink. This is the string counterpart of the counter-snapshot\n   sink fixed in\n   [GHSA-395p-pj7r-jm42](https://github.com/fulgur-rs/fulgur/security/advisories/GHSA-395p-pj7r-jm42);\n   that fix bounded the counter snapshots but did not bound this string twin.\n\nAn attacker able to submit HTML/CSS to a fulgur-based conversion service can\ntrigger memory and CPU exhaustion with a trivially small payload, denying\nservice to the host and any co-tenants.\n\n## Patches\n\nFixed in **0.28.0**. The aggregate of each sink is now separately bounded: the\nresolved `string-set` store (`MAX_STRING_SET_STORE_BYTES`) and the retained\nper-node named-string snapshots (`MAX_STRING_SNAPSHOT_BYTES`). In addition, the\nsnapshot is no longer recorded for `target-*`-only renders — those snapshots are\nconsumed only by `bookmark-label: string(...)`, so recording them when no\nbookmarks are emitted was both wasted work and the only path that let inline\n`target-*` CSS enable the snapshot clone with no bookmark opt-in. The caps are\nkept far above any realistic document (short named strings, even thousands of\nthem); past the cap a `string()` reference degrades to its last recorded value,\nwhich only occurs under adversarial input.\n\n## Workarounds\n\nUpgrade to 0.28.0 or later. If upgrading is not immediately possible, validate\nor constrain untrusted CSS — in particular a `string-set` rule with a large\nliteral (or `content(text)` / `attr(...)`) value matched by many elements —\nbefore passing HTML to fulgur, and bound the size and element count of accepted\ninput.\n\n## Attack Vector rationale\n\n`fulgur` performs no network I/O of its own; it renders HTML/CSS handed to it by\nthe embedding application. This advisory scores the crate independent of any\nspecific adopting program, so per the CVSS v3.1 User Guide §3.7 (scoring library\nvulnerabilities related to incoming data) the Attack Vector is assessed as\n**Network** for the reasonable worst-case deployment — a network-facing service\nthat renders untrusted, attacker-supplied HTML without user interaction. A\nconcrete system that receives the HTML in one component and passes it to fulgur\nin a separate component may assess a lower environmental Attack Vector (Local,\nper §3.10).","published":"2026-11-11T22:12:18.353Z","modified":"2026-11-14T02:30:24.187904321Z","cvss":{"score":7.5,"severity":"HIGH","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"},"epss":{"score":0.00669,"percentile":0.52689,"asOf":"2026-11-24"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"crates.io","name":"fulgur","fixedVersion":"0.28.0"}],"fix":{"url":"https://github.com/fulgur-rs/fulgur/commit/1c4cdad003daef7c9dc6ef1362c50bcfaac13ea9","label":"fulgur-rs/fulgur@1c4cdad"},"references":[{"type":"WEB","url":"https://github.com/fulgur-rs/fulgur/releases/tag/v0.29.0"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/68xxx/CVE-2026-68539.json"},{"type":"ADVISORY","url":"https://github.com/fulgur-rs/fulgur/security/advisories/GHSA-vw2v-g4x7-xcqg"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-68539"},{"type":"FIX","url":"https://github.com/fulgur-rs/fulgur/commit/1c4cdad003daef7c9dc6ef1362c50bcfaac13ea9"},{"type":"FIX","url":"https://github.com/fulgur-rs/fulgur/commit/9248fbfd91a2ba8fc3dbd9e44ba681f52ed1ecd0"},{"type":"FIX","url":"https://github.com/fulgur-rs/fulgur/pull/582"},{"type":"FIX","url":"https://github.com/fulgur-rs/fulgur/pull/584"},{"type":"PACKAGE","url":"https://github.com/fulgur-rs/fulgur"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-11-14T02:30:24.187904321Z"}}