CVE-2023-34095: openprinting cpdb-libs Stack-based Buffer Overflow
Vulnerability summary
CVE-2023-34095 is a critical (CVSS 9.8) Stack-based Buffer Overflow vulnerability in openprinting cpdb-libs. EPSS estimates a 1.54% chance of exploitation in the next 30 days, higher than 74.5% of scored vulnerabilities. 2 public exploits are recorded.
Timeline
- 14-06-2023PublishedVulnerability first disclosed.
- 13-02-2025Last modifiedVulnerability information updated.
Description
cpdb-libs provides frontend and backend libraries for the Common Printing Dialog Backends (CPDB) project. In versions 1.0 through 2.0b4, cpdb-libs is vulnerable to buffer overflows via improper use of `scanf(3)`. cpdb-libs uses the `fscanf()` and `scanf()` functions to parse command lines and configuration files, dropping the read string components into fixed-length buffers, but does not limit the length of the strings to be read by `fscanf()` and `scanf()` causing buffer overflows when a string is longer than 1023 characters. A patch for this issue is available at commit f181bd1f14757c2ae0f17cc76dc20421a40f30b7. As all buffers have a length of 1024 characters, the patch limits the maximum string length to be read to 1023 by replacing all occurrences of `%s` with `%1023s` in all calls of the `fscanf()` and `scanf()` functions.
CVSS metrics
4 scores · 4 sources · 1 version- OSV · UbuntuEcosystem advisory · calculated9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- OSV · DebianEcosystem advisory · calculated9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- NVDNIST9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS trend
Probability
1.54%
Chance of exploitation in the next 30 days
Percentile
75%
Versus all other CVEs
30-day change
0.00 pp
From 1.54% on 19-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
2 foundCpdb Libs
Maturity: poc
Exploit Reference (openwall.com)
Maturity: unknown
Weaknesses
CWE · root cause- CWE-121Stack-based Buffer OverflowA stack-based buffer overflow condition is a condition where the buffer being overwritten is allocated on the stack (i.e., is a local variable or, rarely, a parameter to a function).
- CWE-787Out-of-bounds WriteThe product writes data past the end, or before the beginning, of the intended buffer.
Affected systems
Debian1 product
- cpdb-libs< 1.2.0-2+deb12u1 | < 1.2.0-3
Openprinting1 product
- cpdb-libs≥ 1.0, ≤ 2.0b4 | ≥ 1.0, < 2.0 | 2.0:beta1 | 2.0:beta2 | 2.0:beta3 | 2.0:beta4
Ubuntu1 product
- cpdb-libsAll versions (No fix recorded) | < 1.2.0-0ubuntu7.1 | < 1.2.0-0ubuntu8.1.22.04.1
3 vendors · 3 products
References
11 links- github.com/OpenPrinting/cpdb-libs/security/advisories/GHSA-25j7-9gfc-f46xX Refsource CONFIRMREPORTExploitVendor Advisory
- github.com/OpenPrinting/cpdb-libs/commit/f181bd1f14757c2ae0f17cc76dc20421a40f30b7X Refsource MISCPatch