GHSA-88q9-cmp2-c2vq
### Impact `oxidize-pdf` defines `Color` as a `pub enum` with public tuple-struct variants `Rgb(f64, f64, f64)`, `Gray(f64)`, and `Cmyk(f64, f64, f64, f64)`. The constructors `Color::rgb`, `Color::gray`, and `Color::cmyk` clamp incoming components to `[0.0, 1.0]`, but because the variants are `pub`, callers can construct values directly without going through the constructors: ```rust let safe = Color::rgb(f64::NAN, 0.5, 0.5); // clamps NaN to 0.0 let attack = Color::Rgb(f64::NAN, 0.5, 0.5); // bypasses clamp Color: Copy allows the non-finite value to propagate freely through API surfaces and serialisation. When such a value reaches a content-stream emitter, the writer formats it via format!("{:.3}", v). The Rust standard library renders f64::NAN as "NaN", f64::INFINITY as "inf", and f64::NEG_INFINITY as "-inf" — none of which are valid PDF numeric tokens per ISO 32000-1 §7.3.3: ▎ A numeric object shall be represented by one or more decimal digits with an optional sign and a leading, trailing, or embedded PERIOD. The resulting content stream contains an invalid token sequence (e.g. NaN 0.500 0.500 rg). Conformant PDF viewers (Adobe Acrobat, Foxit, PDF.js, Apple Preview) reject the content stream, the affected page, or the entire document depending on parser strictness. Affected packages (all listed in the "Affected products" section of this advisory): - oxidize-pdf on crates.io — the core Rust library where the vulnerable code path lives. - OxidizePdf.NET on NuGet — .NET FFI binding that exposes Color through its public API; inherits the vulnerability from its dependency on oxidize-pdf. - oxidize-pdf on PyPI — Python bindings (PyO3) that similarly expose colour construction; inherits the vulnerability from its dependency. Who is impacted: any application that uses these packages to generate PDFs and accepts user-influenced colour values without validation. The most exposed surfaces are server-side PDF generators that take
Properties
- ghsa_id
- GHSA-88q9-cmp2-c2vq
- severity
- medium
- summary
- oxidize-pdf: NaN/inf bypass in colour content-stream emission causes PDF rejection (DoS)
- cvss_score
- 4.3
- cve_id
- GHSA-88q9-cmp2-c2vq
- cvss_vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L
- is_ghsa_only
- true
- ghsa_published
- 2026-05-11T14:53:25Z
- source_url
- https://github.com/advisories/GHSA-88q9-cmp2-c2vq
- ghsa_updated
- 2026-05-11T14:53:27Z
Related Entities (9)
AFFECTS (3)
HAS_WEAKNESS (2)
REPORTED_BY (1)
VULNERABLE_TO (3)
Explore deeper with Ninja Signal's threat intelligence graph