CVE-2016-3981
Heap-based buffer overflow in the bmp_read_rows function in pngxrbmp.c in OptiPNG before 0.7.6...
Heap-based buffer overflow in the bmp_read_rows function in pngxrbmp.c in OptiPNG before 0.7.6 allows remote attackers to cause a denial of service (out-of-bounds read or write access and crash) or possibly execute arbitrary code via a crafted image file.
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
7.8
Heap-based buffer overflow in the bmp_read_rows function in pngxrbmp.c in OptiPNG before 0.7.6 allows remote attackers to cause a denial of service (out-of-bounds read or write access and crash) or possibly execute arbitrary code via a crafted image file.
- Record
CVE-2016-3981- CVSS 3.0
- 7.8 High
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - CVSS 2.0
- 9.3 High
AV:N/AC:M/Au:N/C:C/I:C/A:C - Weakness
- CWE-119
- Updated
- 2026-11-02
CVE List No score
Heap-based buffer overflow in the bmp_read_rows function in pngxrbmp.c in OptiPNG before 0.7.6 allows remote attackers to cause a denial of service (out-of-bounds read or write access and crash) or possibly execute arbitrary code via a crafted image file.
- Record
CVE-2016-3981- Updated
- 2026-11-02
EUVDEUVD-2016-4990 No score
Heap-based buffer overflow in the bmp_read_rows function in pngxrbmp.c in OptiPNG before 0.7.6 allows remote attackers to cause a denial of service (out-of-bounds read or write access and crash) or possibly execute arbitrary code via a crafted image file.
- Record
EUVD-2016-4990- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-cjrq-gcqj-47wm
7.8
Heap-based buffer overflow in the bmp_read_rows function in pngxrbmp.c in OptiPNG before 0.7.6...
Heap-based buffer overflow in the bmp_read_rows function in pngxrbmp.c in OptiPNG before 0.7.6 allows remote attackers to cause a denial of service (out-of-bounds read or write access and crash) or possibly execute arbitrary code via a crafted image file.
- Record
GHSA-cjrq-gcqj-47wm- CVSS 3.0
- 7.8 High
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Weakness
- CWE-119
- Updated
- 2026-11-02
OSV
7.8
Heap-based buffer overflow in the bmp_read_rows function in pngxrbmp.c in OptiPNG before 0.7.6 allows remote attackers to cause a denial of service (out-of-bounds read or write access and crash) or possibly execute arbitrary code via a crafted image file.
- Record
CVE-2016-3981- CVSS 3.0
- 7.8 High
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVDEBIAN-CVE-2016-3981
7.8
Heap-based buffer overflow in the bmp_read_rows function in pngxrbmp.c in OptiPNG before 0.7.6 allows remote attackers to cause a denial of service (out-of-bounds read or write access and crash) or possibly execute arbitrary code via a crafted image file.
- Record
DEBIAN-CVE-2016-3981- CVSS 3.0
- 7.8 High
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVOESA-2021-1288
2.7
optipng security update
Security Fix(es):
Off-by-one error in the bmp_rle4_fread function in pngxrbmp.c in OptiPNG before 0.7.6 allows remote attackers to cause a denial of service (out-of-bounds read or write access and crash) or possibly execute arbitrary code via a crafted image file, which triggers a heap-based buffer overflow.(CVE-2016-3982)
Heap-based buffer overflow in the bmp_read_rows function in pngxrbmp.c in OptiPNG before 0.7.6 allows remote attackers to cause a denial of service (out-of-bounds read or write access and crash) or possibly execute arbitrary code via a crafted image file.(CVE-2016-3981)
- Record
OESA-2021-1288- CVSS 3.1
- 2.7 Low
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:N/A:N - Updated
- 2026-11-02
OSVUBUNTU-CVE-2016-3981
7.8
Heap-based buffer overflow in the bmp_read_rows function in pngxrbmp.c in OptiPNG before 0.7.6 allows remote attackers to cause a denial of service (out-of-bounds read or write access and crash) or possibly execute arbitrary code via a crafted image file.
- Record
UBUNTU-CVE-2016-3981- CVSS 3.0
- 7.8 High
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVUSN-2951-1 No score
optipng vulnerabilities
Gustavo Grieco discovered that OptiPNG incorrectly handled memory. A remote attacker could use this issue with a specially crafted image file to cause OptiPNG to crash, resulting in a denial of service. (CVE-2015-7801)
Gustavo Grieco discovered that OptiPNG incorrectly handled memory. A remote attacker could use this issue with a specially crafted image file to cause OptiPNG to crash, resulting in a denial of service. (CVE-2015-7802)
Hans Jerry Illikainen discovered that OptiPNG incorrectly handled memory. A remote attacker could use this issue with a specially crafted image file to cause OptiPNG to crash, resulting in a denial of service, or possibly execute arbitrary code. (CVE-2016-2191)
Henri Salo discovered that OptiPNG incorrectly handled memory. A remote attacker could use this issue with a specially crafted image file to cause OptiPNG to crash, resulting in a denial of service, or possibly execute arbitrary code. (CVE-2016-3981)
Henri Salo discovered that OptiPNG incorrectly handled memory. A remote attacker could use this issue with a specially crafted image file to cause OptiPNG to crash, resulting in a denial of service, or possibly execute arbitrary code. (CVE-2016-3982)
- Record
USN-2951-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
optipngDebian:12 |
before 0.7.6-1 | 0.7.6-1 |
optipngDebian:13 |
before 0.7.6-1 | 0.7.6-1 |
optipngDebian:14 |
before 0.7.6-1 | 0.7.6-1 |
optipngDebian:7 From an advisory covering 3 CVEs |
before 0.6.4-1+deb7u2, plus listed versions 0.6.4-10.6.4-1+deb7u1 |
0.6.4-1+deb7u2 |
optipngDebian:8 From an advisory covering 3 CVEs |
before 0.7.5-1+deb8u1, plus listed versions 0.7.5-1 |
0.7.5-1+deb8u1 |
optipngopenEuler:20.03-LTS-SP2 From an advisory covering 2 CVEs |
before 0.7.7-1.oe1 | 0.7.7-1.oe1 |
optipngUbuntu:14.04:LTS |
before 0.6.4-1ubuntu0.14.04.1, plus listed versions 0.6.4-1build1 |
0.6.4-1ubuntu0.14.04.1 |
optipngUbuntu:14.04:LTS From an advisory covering 5 CVEs |
before 0.6.4-1ubuntu0.14.04.1, plus listed versions 0.6.4-1build1 |
0.6.4-1ubuntu0.14.04.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2016-3981 is a high vulnerability (CVSS 7.8) in Optipng Project Optipng, published April 7, 2016. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 4.43%, the 91st percentile. Fixed in optipng 0.7.6-1.
References
bugs.fi/media/afl/optipng/1
sourceforge.net/p/optipng/bugs/56
lists.opensuse.org/opensuse-updates/2016-04/msg00065.html
debian.org/security/2016/dsa-3546
ubuntu.com/usn/USN-2951-1
lists.opensuse.org/opensuse-updates/2016-04/msg00061.html
Show 13 moreShow less
security.gentoo.org/glsa/201608-01
nvd.nist.gov/vuln/detail/CVE-2016-3981
github.com/advisories/GHSA-cjrq-gcqj-47wm
security-tracker.debian.org/tracker/CVE-2016-3981
openeuler.org/en/security/safety-bulletin/detail.html?id=openEuler-SA-2021-1288
nvd.nist.gov/vuln/detail/CVE-2016-3982
ubuntu.com/security/CVE-2016-3981
ubuntu.com/security/notices/USN-2951-1
cve.org/CVERecord?id=CVE-2016-3981
ubuntu.com/security/CVE-2015-7801
ubuntu.com/security/CVE-2015-7802
ubuntu.com/security/CVE-2016-2191
ubuntu.com/security/CVE-2016-3982