CVE-2018-5785: In OpenJPEG 2.3.0, there is an integer overflow caused by an out-of-bounds left shift in the opj_j2k_setup_encoder function (openjp2/j2k.c).
Noroxi assessment
Priority: Monitor (action score 27/100)
- The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
- Probability of exploitation in the next 30 days: 2.1% (FIRST EPSS); higher than 82.5% of all records.
- Anyone who can reach it over the internet can trigger it. No account or password is required. A user must open a link or visit a page. No special conditions are required; it is repeatable.
- Fixed version: openjpeg2 (AlmaLinux:8) 2.4.0-4.el8; openjpeg2-devel (AlmaLinux:8) 2.4.0-4.el8; openjpeg2-devel-docs (AlmaLinux:8) 2.4.0-4.el8.
Low priority for now. Upgrade to openjpeg2 (AlmaLinux:8) 2.4.0-4.el8; openjpeg2-devel (AlmaLinux:8) 2.4.0-4.el8; openjpeg2-devel-docs (AlmaLinux:8) 2.4.0-4.el8 or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: NVD · CVE.org · FIRST EPSS
In OpenJPEG 2.3.0, there is an integer overflow caused by an out-of-bounds left shift in the opj_j2k_setup_encoder function (openjp2/j2k.c). Remote attackers could leverage this vulnerability to cause a denial of service via a crafted bmp file.
- Published
- Jan 19, 2018
- Updated
- Jun 16, 2026
- EPSS
- 2.1% · 82th percentile
- CWE
- CWE-190
Report tools
Action score
27
Low priority for now.
- CVSS
- 26 / 40 · 6.5 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 1 / 30 · 2.1%
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- No public exploit code on record
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Is your version affected? Check itNoroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| uclouvain | openjpeg | cpe:2.3:a:uclouvain:openjpeg |
| debian | debian linux | cpe:2.3:o:debian:debian_linux |
| canonical | ubuntu linux | cpe:2.3:o:canonical:ubuntu_linux |
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- canonical ubuntu linux18.04
- debian debian linux9.0
- uclouvain openjpeg2.3.0
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| AlmaLinux:8 | openjpeg2 | before 2.4.0-4.el8 | 2.4.0-4.el8 |
| AlmaLinux:8 | openjpeg2-devel | before 2.4.0-4.el8 | 2.4.0-4.el8 |
| AlmaLinux:8 | openjpeg2-devel-docs | before 2.4.0-4.el8 | 2.4.0-4.el8 |
| AlmaLinux:8 | openjpeg2-tools | before 2.4.0-4.el8 | 2.4.0-4.el8 |
| Alpine:v3.10 | openjpeg | before 2.3.0-r3 | 2.3.0-r3 |
| Alpine:v3.6 | openjpeg | before 2.3.0-r2 | 2.3.0-r2 |
| Debian:12 | openjpeg2 | before 2.3.0-2 | 2.3.0-2 |
| Debian:9 | openjpeg2 | before 2.1.2-1.1+deb9u3 | 2.1.2-1.1+deb9u3 |
| openSUSE:Leap 15.3 | openjpeg2 | before 2.3.0-150000.3.5.1 | 2.3.0-150000.3.5.1 |
| Red Hat:enterprise_linux:8::appstream | openjpeg2 | before 0:2.4.0-4.el8 | 0:2.4.0-4.el8 |
| Red Hat:enterprise_linux:8::appstream | openjpeg2-debuginfo | before 0:2.4.0-4.el8 | 0:2.4.0-4.el8 |
| Red Hat:enterprise_linux:8::appstream | openjpeg2-debugsource | before 0:2.4.0-4.el8 | 0:2.4.0-4.el8 |
| Red Hat:enterprise_linux:8::appstream | openjpeg2-devel-docs | before 0:2.4.0-4.el8 | 0:2.4.0-4.el8 |
| Red Hat:enterprise_linux:8::appstream | openjpeg2-tools | before 0:2.4.0-4.el8 | 0:2.4.0-4.el8 |
| Red Hat:enterprise_linux:8::appstream | openjpeg2-tools-debuginfo | before 0:2.4.0-4.el8 | 0:2.4.0-4.el8 |
| Red Hat:enterprise_linux:8::crb | openjpeg2-devel | before 0:2.4.0-4.el8 | 0:2.4.0-4.el8 |
| Rocky Linux:8 | openjpeg2 | before 0:2.4.0-4.el8 | 0:2.4.0-4.el8 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP3 | openjpeg2 | before 2.3.0-150000.3.5.1 | 2.3.0-150000.3.5.1 |
Same product
uclouvain: all recordsOther highest-scoring records for the same primary product.
- CVE-2012-3358Multiple heap-based buffer overflows in the j2k_read_sot function in j2k.c in OpenJPEG 1.5 allow remote attackers to cause a denial of…42Plan
- CVE-2017-17480In OpenJPEG 2.3.0, a stack-based buffer overflow was discovered in the pgxtovolume function in jp3d/convert.c.41Plan
- CVE-2013-4290Stack-based buffer overflow in OpenJPEG before 1.5.2 allows remote attackers to have unspecified impact via unknown vectors to (1)…41Plan
Published before and after this one in the same product
- ← EarlierCVE-2017-17479Dec 8, 2017 · In OpenJPEG 2.3.0, a stack-based buffer overflow was discovered in the pgxtoimage function in jpwl/convert.c.40Plan
- ← EarlierCVE-2018-5727Jan 16, 2018 · In OpenJPEG 2.3.0, there is an integer overflow vulnerability in the opj_t1_encode_cblks function (openjp2/t1.c).27Monitor
- Later →CVE-2018-6616Feb 4, 2018 · In OpenJPEG 2.3.0, there is excessive iteration in the opj_t1_encode_cblks function of openjp2/t1.c.22Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| almalinux:openjpeg2 | 2.4.0-4.el8 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:openjpeg2-devel | 2.4.0-4.el8 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:openjpeg2-devel-docs | 2.4.0-4.el8 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:openjpeg2-tools | 2.4.0-4.el8 · AlmaLinux:8 | Package registry (OSV) |
| alpine:openjpeg | 2.3.0-r3 · Alpine:v3.10 | Package registry (OSV) |
| debian:openjpeg2 | 2.3.0-2 · Debian:12 | Package registry (OSV) |
| opensuse:openjpeg2 | 2.3.0-150000.3.5.1 · openSUSE:Leap 15.3 | Package registry (OSV) |
| red hat:openjpeg2 | 0:2.4.0-4.el8 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:openjpeg2-debuginfo | 0:2.4.0-4.el8 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:openjpeg2-debugsource | 0:2.4.0-4.el8 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:openjpeg2-devel | 0:2.4.0-4.el8 · Red Hat:enterprise_linux:8::crb | Package registry (OSV) |
| red hat:openjpeg2-devel-docs | 0:2.4.0-4.el8 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:openjpeg2-tools | 0:2.4.0-4.el8 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:openjpeg2-tools-debuginfo | 0:2.4.0-4.el8 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| rocky linux:openjpeg2 | 0:2.4.0-4.el8 · Rocky Linux:8 | Package registry (OSV) |
| suse:openjpeg2 | 2.3.0-150000.3.5.1 · SUSE:Linux Enterprise Module for Basesystem 15 SP3 | Package registry (OSV) |
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
Not on record for this CVE: EPSS history · patch commit or PR link · researcher credit · variant or chain candidate · public bounty program.
Technical details
Attack conditions
- Anyone who can reach it over the internet can trigger it.
- No account or password is required.
- A user must open a link or visit a page.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- none
- Integrity
- none
- Availability
- high · the service can be disrupted
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- Required
- Scope
- Unchanged
- Confidentiality impact
- None
- Integrity impact
- None
- Availability impact
- High
Weakness class (CWE)
CWE-190 · Integer Overflow or WraparoundCVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
nvd-primary
Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
ATT&CK techniques
—
Change log (1)
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (1 more)Show less
Vendor advisories and official records. Exploit/PoC links are deliberately left out.