Medium
Security advisory
The bmp_read_info_header function in bin/jp2/convertbmp.c in OpenJPEG 2.2.0 does not reject headers with a zero biBitCount, which allows remote attackers to cause a denial of service (memory allocation failure) in the opj_image_create function in lib/openjp2/image.c, related to the opj_aligned_alloc_n function in opj_malloc.c.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2017-12982
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 12:13 UTC · Revision 1
Source evidence
The bmp_read_info_header function in bin/jp2/convertbmp.c in OpenJPEG 2.2.0 does not reject headers with a zero biBitCount, which allows remote attackers to cause a denial of service (memory allocation failure) in the opj_image_create function in lib/openjp2/image.c, related to the opj_aligned_alloc_n function in opj_malloc.c.
osv:CVE-2017-12982
Complete source record
{
"id": "6d9d9bdcac9f1ea6fc5d13cedb69c4ed6c10f440f91e4d0e6236dded6bb87e11",
"url": "https://osv.dev/vulnerability/CVE-2017-12982",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2017-12982",
"summary": "The bmp_read_info_header function in bin/jp2/convertbmp.c in OpenJPEG 2.2.0 does not reject headers with a zero biBitCount, which allows remote attackers to cause a denial of service (memory allocation failure) in the opj_image_create function in lib/openjp2/image.c, related to the opj_aligned_alloc_n function in opj_malloc.c.",
"evidence": "osv:CVE-2017-12982",
"products": [],
"severity": "medium",
"structured": {
"id": "CVE-2017-12982",
"aliases": [
"CVE-2017-12982"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/uclouvain/openjpeg",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "081de4b15f54cb4482035b7bf5e3fb443e4bc84b"
},
{
"fixed": "baf0c1ad4572daa89caa3b12985bdd93530f0dd7"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:uclouvain:openjpeg:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "2.3.0"
}
],
"source": "CPE_RANGE"
},
{
"range": [
{
"fixed": "baf0c1ad4572daa89caa3b12985bdd93530f0dd7"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"versions": [
"v2.2.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2017-12982.json",
"vanir_signatures": [
{
"id": "CVE-2017-12982-4cebdc3d",
"digest": {
"threshold": 0.9,
"line_hashes": [
"32483295321228823534696507974797187153",
"296002183442861096462899504896635776348",
"37440565878080639574652199070067340010",
"219591937768648570144702747136129848003"
]
},
"source": "https://github.com/uclouvain/openjpeg/commit/baf0c1ad4572daa89caa3b12985bdd93530f0dd7",
"target": {
"file": "src/bin/jp2/convertbmp.c"
},
"deprecated": false,
"signature_type": "Line",
"signature_version": "v1"
},
{
"id": "CVE-2017-12982-5279c3de",
"digest": {
"length": 5928,
"function_hash": "105053355577131966731431843433851090146"
},
"source": "https://github.com/uclouvain/openjpeg/commit/baf0c1ad4572daa89caa3b12985bdd93530f0dd7",
"target": {
"file": "src/bin/jp2/convertbmp.c",
"function": "bmp_read_info_header"
},
"deprecated": false,
"signature_type": "Function",
"signature_version": "v1"
}
],
"vanir_signatures_modified": "2026-10-20T13:22:13Z"
}
}
],
"modified": "2026-10-20T13:22:13.890823767Z",
"provider": "osv",
"references": [
"https://security.gentoo.org/glsa/201710-26",
"https://blogs.gentoo.org/ago/2017/08/14/openjpeg-memory-allocation-failure-in-opj_aligned_alloc_n-opj_malloc-c/",
"https://github.com/uclouvain/openjpeg/commit/baf0c1ad4572daa89caa3b12985bdd93530f0dd7",
"https://github.com/uclouvain/openjpeg/issues/983"
],
"provider_metadata": {}
},
"related_cves": [
{
"value": "CVE-2017-12982",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 387573,
"published_at": "2017-08-21T07:29:00.373+00:00"
}