# CVE-2020-12268: Memory corruption in n/a

> A heap-based buffer overflow in the jbig2dec library allows attackers to execute arbitrary code or cause denial of service via crafted JBIG2 images.

- **Severity:** Critical 9.8 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 27 Apr 2020
- **Updated:** 4 Aug 2024
- **Also known as:** ALPINE-CVE-2020-12268, DEBIAN-CVE-2020-12268, GHSA-ccx8-28wr-3jgq, MGASA-2020-0213, RHSA-2020:2897, RHSA-2020:2971, RHSA-2020:3043, SUSE-SU-2020:1212-1, SUSE-SU-2020:1220-1, UBUNTU-CVE-2020-12268, openSUSE-SU-2020:0653-1

## What is CVE-2020-12268?

CVE-2020-12268 is a critical memory corruption vulnerability in Debian Debian Linux, published on 27 Apr 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

jbig2_image_compose in jbig2_image.c in Artifex jbig2dec before 0.18 has a heap-based buffer overflow.

Weakness: CWE-787 (Out-of-bounds Write)

## Which versions are affected by CVE-2020-12268?

It affects 3 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `jbig2dec` | Red Hat:enterprise_linux:8::appstream | All versions | 0:0.14-4.el8_2 |
| `jbig2dec-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:0.14-4.el8_2 |
| `jbig2dec-debugsource` | Red Hat:enterprise_linux:8::appstream | All versions | 0:0.14-4.el8_2 |
| `jbig2dec-libs` | Red Hat:enterprise_linux:8::appstream | All versions | 0:0.14-4.el8_2 |
| `jbig2dec-libs-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:0.14-4.el8_2 |
| `jbig2dec` | Red Hat:rhel_e4s:8.0::appstream | All versions | 0:0.14-4.el8_0 |
| `jbig2dec-debuginfo` | Red Hat:rhel_e4s:8.0::appstream | All versions | 0:0.14-4.el8_0 |
| `jbig2dec-debugsource` | Red Hat:rhel_e4s:8.0::appstream | All versions | 0:0.14-4.el8_0 |
| `jbig2dec-libs` | Red Hat:rhel_e4s:8.0::appstream | All versions | 0:0.14-4.el8_0 |
| `jbig2dec-libs-debuginfo` | Red Hat:rhel_e4s:8.0::appstream | All versions | 0:0.14-4.el8_0 |
| `jbig2dec` | Red Hat:rhel_eus:8.1::appstream | All versions | 0:0.14-4.el8_1 |
| `jbig2dec-debuginfo` | Red Hat:rhel_eus:8.1::appstream | All versions | 0:0.14-4.el8_1 |
| `jbig2dec-debugsource` | Red Hat:rhel_eus:8.1::appstream | All versions | 0:0.14-4.el8_1 |
| `jbig2dec-libs` | Red Hat:rhel_eus:8.1::appstream | All versions | 0:0.14-4.el8_1 |
| `jbig2dec-libs-debuginfo` | Red Hat:rhel_eus:8.1::appstream | All versions | 0:0.14-4.el8_1 |
| `ghostscript` | SUSE:Enterprise Storage 5 | All versions | 9.52-23.34.1 |
| `libspectre` | SUSE:Enterprise Storage 5 | All versions | 0.2.7-12.10.1 |
| `ghostscript` | SUSE:HPE Helion OpenStack 8 | All versions | 9.52-23.34.1 |
| `libspectre` | SUSE:HPE Helion OpenStack 8 | All versions | 0.2.7-12.10.1 |
| `ghostscript` | SUSE:Linux Enterprise High Performance Computing 15-ESPOS | All versions | 9.52-3.27.2 |
| `libspectre` | SUSE:Linux Enterprise High Performance Computing 15-ESPOS | All versions | 0.2.8-3.10.1 |
| `ghostscript` | SUSE:Linux Enterprise High Performance Computing 15-LTSS | All versions | 9.52-3.27.2 |
| `libspectre` | SUSE:Linux Enterprise High Performance Computing 15-LTSS | All versions | 0.2.8-3.10.1 |
| `ghostscript` | SUSE:Linux Enterprise Module for Basesystem 15 SP1 | All versions | 9.52-3.27.2 |
| `libspectre` | SUSE:Linux Enterprise Module for Desktop Applications 15 SP1 | All versions | 0.2.8-3.10.1 |
| `ghostscript` | SUSE:Linux Enterprise Server 12 SP1-LTSS | All versions | 9.52-23.34.1 |
| `libspectre` | SUSE:Linux Enterprise Server 12 SP1-LTSS | All versions | 0.2.7-12.10.1 |
| `ghostscript` | SUSE:Linux Enterprise Server 12 SP2-BCL | All versions | 9.52-23.34.1 |
| `libspectre` | SUSE:Linux Enterprise Server 12 SP2-BCL | All versions | 0.2.7-12.10.1 |
| `ghostscript` | SUSE:Linux Enterprise Server 12 SP2-LTSS | All versions | 9.52-23.34.1 |
| `libspectre` | SUSE:Linux Enterprise Server 12 SP2-LTSS | All versions | 0.2.7-12.10.1 |
| `ghostscript` | SUSE:Linux Enterprise Server 12 SP3-BCL | All versions | 9.52-23.34.1 |
| `libspectre` | SUSE:Linux Enterprise Server 12 SP3-BCL | All versions | 0.2.7-12.10.1 |
| `ghostscript` | SUSE:Linux Enterprise Server 12 SP3-LTSS | All versions | 9.52-23.34.1 |
| `libspectre` | SUSE:Linux Enterprise Server 12 SP3-LTSS | All versions | 0.2.7-12.10.1 |
| `ghostscript` | SUSE:Linux Enterprise Server 12 SP4 | All versions | 9.52-23.34.1 |
| `libspectre` | SUSE:Linux Enterprise Server 12 SP4 | All versions | 0.2.7-12.10.1 |
| `ghostscript` | SUSE:Linux Enterprise Server 12 SP5 | All versions | 9.52-23.34.1 |
| `libspectre` | SUSE:Linux Enterprise Server 12 SP5 | All versions | 0.2.7-12.10.1 |
| `ghostscript` | SUSE:Linux Enterprise Server 15-LTSS | All versions | 9.52-3.27.2 |

Products: Artifex Jbig2dec, Debian Debian Linux, Opensuse Leap.

## How do I fix CVE-2020-12268?

Upgrade to a fixed version.

## Is CVE-2020-12268 being exploited?

There is no known exploitation of CVE-2020-12268 in the wild and no public exploit code.

## Other vulnerabilities in Debian Debian Linux

- [CVE-2017-7975](https://insights.sbomify.com/CVE-2017-7975/): Integer overflow in n/a (high 7.8)
- [CVE-2017-7976](https://insights.sbomify.com/CVE-2017-7976/): Integer overflow in n/a (high 7.1)
- [CVE-2017-7885](https://insights.sbomify.com/CVE-2017-7885/): Integer overflow in n/a (high 7.1)
- [CVE-2023-46361](https://insights.sbomify.com/CVE-2023-46361/): Denial of service in n/a (medium 6.5)
- [CVE-2017-9216](https://insights.sbomify.com/CVE-2017-9216/): Null dereference in n/a (medium 6.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2020-12268 and fix it if it is affected.

What it is: CVE-2020-12268 is a critical memory corruption vulnerability in Debian Debian Linux, published on 27 Apr 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2020-12268 in the wild and no public exploit code.

Affected product: Debian Debian Linux. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2020-12268/ (Markdown: https://insights.sbomify.com/CVE-2020-12268/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2020-12268
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2020-12268
- OSV: https://osv.dev/vulnerability/CVE-2020-12268

---
From sbomify Insights: https://insights.sbomify.com/CVE-2020-12268/
Summaries are generated and may contain mistakes; the official description above is the record.
