CVE-2016-9112
High · 7.5CVSS
7.5
EPSS
3.2%
Published
Oct 29, 2016
CISA due date
—
Cloudanix analysis
A programming mistake in a widely used picture-handling library can make programs crash when they try to open certain image files.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Library
- Class
- Denial of service
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The flaw triggers a floating-point exception (divide-by-zero) inside opj_pi_next_cprl at openjp2/pi.c:523 when a malformed JPEG2000 codestream is parsed, causing the calling process to terminate abnormally.
Why it matters to the business
Systems that decode untrusted JPEG2000 images experience sudden application or service crashes, producing denial-of-service conditions and potential loss of image-processing availability until the process is restarted.
How an attack unfolds
An attacker crafts a minimal JPEG2000 file whose tile or precinct geometry produces a zero divisor in the progression-order iterator; the file is supplied to any application linked against the vulnerable OpenJPEG library, which crashes on first decode attempt.
How to fix it
Upgrade the OpenJPEG library to a version containing the fix for CVE-2016-9112 (2.1.3 or later) and rebuild all dependent applications; where upgrades are impossible, reject untrusted JPEG2000 content or wrap the decoder in a crash-isolated sandbox.
How to confirm the fix worked
Confirm the installed libopenjp2.so (or equivalent) reports version 2.1.3 or newer; execute the original proof-of-concept file against the patched build and verify the process no longer terminates with SIGFPE.
Typical attack path
- Generate a specially malformed JP2/J2K codestream that forces a zero divisor in opj_pi_next_cprl
- Deliver the file to the target via network upload, email attachment, web page, or any other untrusted image ingestion path
- Victim application calls the OpenJPEG decode routine on the file
- Divide-by-zero exception is raised and the process aborts
How to detect it
Monitor process crash logs for SIGFPE or floating-point exceptions originating from libopenjp2 or openjp2.dll; correlate with recent receipt of JPEG2000 files in application or web-server logs.
What your security team should do
- Immediately inventory all hosts and containers that ship or link against OpenJPEG 2.1.2 or earlier
- Prioritize patching of any internet-facing image-processing services or document viewers
- Add OpenJPEG to the organization's vulnerability exception watch list until all instances are updated
The record
Floating Point Exception (aka FPE or divide by zero) in opj_pi_next_cprl function in openjp2/pi.c:523 in OpenJPEG 2.1.2.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | openjpeg2 | 0 | 2.1.2-1.2 |
| Debian:12 | openjpeg2 | 0 | 2.1.2-1.2 |
| Debian:13 | openjpeg2 | 0 | 2.1.2-1.2 |
| Debian:8 | openjpeg2 | 0 | 2.1.0-2+deb8u7 |
| Mageia:5 | openjpeg2 | 0 | 2.1.2-1.2.mga5 |
| SUSE:Linux Enterprise Desktop 12 SP2 | openjpeg2 | 0 | 2.1.0-3.1 |
| SUSE:Linux Enterprise Server 12 SP2 | openjpeg2 | 0 | 2.1.0-3.1 |
| SUSE:Linux Enterprise Server for Raspberry Pi 12 SP2 | openjpeg2 | 0 | 2.1.0-3.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | openjpeg2 | 0 | 2.1.0-3.1 |
| SUSE:Package Hub 12 | openjpeg2 | 0 | 2.1.0-6.1 |
| SUSE:Package Hub 12 SP1 | openjpeg2 | 0 | 2.1.0-6.1 |
| Ubuntu:14.04:LTS | openjpeg | 0 | No fix |
| Ubuntu:16.04:LTS | openjpeg2 | 0 | 2.1.2-1.1+deb9u5build0.16.04.1 |
| Ubuntu:18.04:LTS | openjpeg2 | 0 | 2.2.0-1 |
| Ubuntu:Pro:14.04:LTS | openjpeg | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | openjpeg | 0 | 1:1.5.2-3.1ubuntu0.1~esm2 |
Related vulnerabilities
- CVE-2024-56827 A flaw was found in the OpenJPEG project. Also affects openjpeg2
- CVE-2024-56826 A flaw was found in the OpenJPEG project. Also affects openjpeg2
- CVE-2023-39329 A flaw was found in OpenJPEG. Also affects openjpeg2
- CVE-2023-39327 A flaw was found in OpenJPEG. Also affects openjpeg2
- CVE-2023-39328 A vulnerability was found in OpenJPEG similar to CVE-2019-6988. Also affects openjpeg2
- CVE-2017-17480 In OpenJPEG 2.3.0, a stack-based buffer overflow was discovered in the pgxtovolume… Also affects openjpeg2
- CVE-2016-10506 Division-by-zero vulnerabilities in the functions opj_pi_next_cprl, opj_pi_next_pcrl, and… Also affects openjpeg2
- CVE-2026-112054 Schroedinger libschroedinger through 1.0.11 contains a divide by zero vulnerability that… CWE-369