CVE-2021-46312
Medium · 6.5CVSS
6.5
EPSS
1.0%
Published
Aug 22, 2023
CISA due date
—
Cloudanix analysis
A bug in a document handling library can make programs that use it stop working when they encounter certain bad files.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Library
- Class
- Improper Input Validation
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
A divide-by-zero condition in IW44EncodeCodec.cpp allows remote attackers to trigger an application crash via specially crafted input data.
Why it matters to the business
Services relying on djvulibre for document processing can be disrupted or rendered unavailable when handling malicious files, leading to operational downtime.
How an attack unfolds
An attacker creates a malformed file designed to trigger the divide-by-zero flaw during encoding operations, then delivers it to a target system where a user or automated process opens or processes the file, causing the application to crash.
How to fix it
Upgrade djvulibre to a version that resolves the divide-by-zero issue once released; in the interim, restrict processing of untrusted files and consider sandboxing the library.
How to confirm the fix worked
Test affected versions with known triggering inputs to confirm crashes occur, then verify post-update behavior shows no crash on the same inputs.
Typical attack path
- Craft a malformed input file that triggers divide-by-zero in the encoder
- Deliver the file via network or removable media
- Victim application processes the file
- Application crashes resulting in denial of service
How to detect it
Inspect application and system logs for crashes or arithmetic exceptions during djvulibre file processing; look for repeated failures when handling specific files.
What your security team should do
- Monitor upstream djvulibre releases for a fix and apply promptly
- Block or sandbox untrusted DJVU file processing in critical workflows
- Review logging for process crashes related to file handling
The record
An issue was discovered IW44EncodeCodec.cpp in djvulibre 3.5.28 in allows attackers to cause a denial of service via divide by zero.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | djvulibre | 0 | No fix |
| Debian:11 | djvulibre | 0 | 3.5.28-2.2~deb11u1 |
| Debian:12 | djvulibre | 0 | No fix |
| Debian:13 | djvulibre | 0 | No fix |
| Debian:14 | djvulibre | 0 | 3.5.28-2.2 |
| Mageia:9 | djvulibre | 0 | 3.5.28-5.1.mga9 |
| SUSE:Linux Enterprise Module for Desktop Applications 15 SP4 | djvulibre | 0 | 3.5.27-150200.11.14.1 |
| SUSE:Linux Enterprise Module for Desktop Applications 15 SP5 | djvulibre | 0 | 3.5.27-150200.11.14.1 |
| SUSE:Linux Enterprise Module for Package Hub 15 SP4 | djvulibre | 0 | 3.5.27-150200.11.14.1 |
| SUSE:Linux Enterprise Module for Package Hub 15 SP5 | djvulibre | 0 | 3.5.27-150200.11.14.1 |
| SUSE:Linux Enterprise Server 12 SP5 | djvulibre | 0 | 3.5.25.3-5.22.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | djvulibre | 0 | 3.5.25.3-5.22.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP5 | djvulibre | 0 | 3.5.25.3-5.22.1 |
| Ubuntu:18.04:LTS | djvulibre | 0 | No fix |
| Ubuntu:20.04:LTS | djvulibre | 0 | No fix |
| Ubuntu:22.04:LTS | djvulibre | 0 | No fix |
| Ubuntu:22.04:LTS | djvulibre | 0 | 3.5.28-2ubuntu0.22.04.2 |
| Ubuntu:24.04:LTS | djvulibre | 0 | No fix |
| Ubuntu:24.04:LTS | djvulibre | 0 | 3.5.28-2ubuntu0.24.04.2 |
| Ubuntu:24.10 | djvulibre | 0 | No fix |
| Ubuntu:25.04 | djvulibre | 0 | No fix |
| Ubuntu:25.10 | djvulibre | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | djvulibre | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | djvulibre | 0 | 3.5.27.1-5ubuntu0.1+esm3 |
| Ubuntu:Pro:18.04:LTS | djvulibre | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | djvulibre | 0 | 3.5.27.1-8ubuntu0.4+esm1 |
| Ubuntu:Pro:20.04:LTS | djvulibre | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | djvulibre | 0 | 3.5.27.1-14ubuntu0.1+esm1 |
| openSUSE:Leap 15.4 | djvulibre | 0 | 3.5.27-150200.11.14.1 |
| openSUSE:Leap 15.5 | djvulibre | 0 | 3.5.27-150200.11.14.1 |
| openSUSE:Tumbleweed | djvulibre | 0 | 3.5.28-6.1 |
Related vulnerabilities
- CVE-2021-46310 An issue was discovered IW44Image.cpp in djvulibre 3.5.28 in allows attackers to cause a… Also affects djvulibre
- CVE-2021-3630 An out-of-bounds write vulnerability was found in DjVuLibre in DJVU::DjVuTXT::decode() in… Also affects djvulibre
- CVE-2021-32490 A flaw was found in djvulibre-3.5.28 and earlier. Also affects djvulibre
- CVE-2026-112054 Schroedinger libschroedinger through 1.0.11 contains a divide by zero vulnerability that… CWE-369
- CVE-2026-93589 ImageMagick before 7.1.2-31 and 6.9.13-56 contains a division-by-zero flaw in the FLIF… CWE-369
- CVE-2026-15417 In the silabser.sys Windows 8 driver for CP210x devices, a local unprivileged user can… CWE-369
- CVE-2026-6244 libpcap BPF interpreter for the 'div #k' and 'mod #k' ALU instructions does not check… CWE-369
- CVE-2026-85458 Divide-by-zero in Xpdf 4.06 (and earlier), when a glyph in a Type 3 font has a zero… CWE-369