Poppler: Integer Overflow or Wraparound
CVE-2022-38784 is a high-severity integer overflow or wraparound vulnerability in Poppler from Freedesktop, with a CVSS 3.1 base score of 7.8 out of 10. It can be exploited with local access to the system by an unauthenticated attacker, but only if a user takes part, for example by opening a link or file. Affected Poppler versions: 22.08.0 and earlier. The record does not name a fixed version, so check the vendor advisory. There is no confirmed exploitation so far. EPSS estimates a 0.63% chance of exploitation within 30 days, higher than 51% of scored CVEs.
High severity with no evidence of exploitation so far.
What to do
- Check which version of Poppler you run against the affected versions below, and install the vendor's latest release.
- Read the advisory on gitlab.freedesktop.org for workarounds and exact fixed builds.
- Because the attack needs a user to take part, warn users about unexpected links and files related to this product until it is patched.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Freedesktop | Poppler | 22.08.0 and earlier | Not stated |
| Debian | Debian Linux | 10.0; 11.0 | Not stated |
| Fedora Project | Fedora | 35; 36; 37 | Not stated |
Version data comes from NVD's product matching. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- LocalThe attacker needs local access or must trick a user into running something.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- RequiredA user must take an action such as opening a file or link.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H. Scored by NVD.
Official description
Poppler prior to and including 22.08.0 contains an integer overflow in the JBIG2 decoder (JBIG2Stream::readTextRegionSeg() in JBIGStream.cc). Processing a specially crafted PDF file or JBIG2 image could lead to a crash or the execution of arbitrary code. This is similar to the vulnerability described by CVE-2022-38171 in Xpdf.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Integer Overflow or Wraparound
The product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. This occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may become a very small or negative number.
How developers prevent this class of flaw
- Ensure that all protocols are strictly defined, such that all out-of-bounds behavior can be identified simply, and require strict conformance to the protocol.
- Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. If possible, choose a language or compiler that performs automatic bounds checking.
- Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. Use libraries or frameworks that make it easier to handle numbers without unexpected consequences. Examples include safe integer handling packages such as SafeInt (C++) or IntegerLib (C or C++).
More Integer Overflow or Wraparound vulnerabilities (CWE-190)
Timeline
- CVE record published.
- Record last changed materially (score, affected products, status or references).
References
Advisories
Third-party and government advisories
- openwall.com/lists/oss-security/2022/09/02/11Mailing List, Third Party Advisory
- github.com/jeffssh/CVE-2021-30860Third Party Advisory
- lists.debian.org/debian-lts-announce/2022/09/msg00030.htmlThird Party Advisory
- security.gentoo.org/glsa/202209-21Third Party Advisory
- cve.org/CVERecord?id=CVE-2022-38171Third Party Advisory
- debian.org/security/2022/dsa-5224Third Party Advisory
Technical write-ups (may include proof of concept)
- github.com/zmanion/Vulnerabilities/blob/main/CVE-2022-38171.mdExploit, Third Party Advisory
Other references
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BGY72LBJMFAKQWC2XH4M…
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/E5Z2677EQUWVHJLGSH5D…
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/J546EJUKUOPWA3JSLP7D…
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/NLKN3HJKZSGEEKOF57DM…
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TQAO6O2XHPQHNW2MWOCJ…
Other vulnerabilities in Poppler
- 7.1 High severity
- 7.5 High severity
- 7.8 High severity
- 7.8 High severity
Apple Multiple Products Integer Overflow Exploited
Recent Integer Overflow or Wraparound vulnerabilities
- 7.8 High severity
- 7.5 High severity
- 8.8 High severity
- 8.8 High severity
- 7.8 High severity
- 7.5 High severity
Spotted an error? Tell us.