# CVE-2021-3697: A crafted JPEG image may lead the JPEG reader to underflow its data pointer, allowing user-controlled data to be written in heap.

- Severity: High 7.0 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.47%, higher than 42% of CVEs (2026-12-01)
- Published: 2022-07-06T15:06:47.000Z
- Modified: 2026-06-17T04:05:34.907Z
- Weaknesses: CWE-787
- Assigned by: redhat

## Description

A crafted JPEG image may lead the JPEG reader to underflow its data pointer, allowing user-controlled data to be written in heap. To a successful to be performed the attacker needs to perform some triage over the heap layout and craft an image with a malicious format and payload. This vulnerability can lead to data corruption and eventual code execution or secure boot circumvention. This flaw affects grub2 versions prior grub-2.12.

(As written by CVE List.)

## Affected

- grub2: grub-2.06
- gnu grub2: from 2.00 before 2.12
- redhat developer_tools: 1.0
- redhat openshift: 3.0
- redhat enterprise_linux: 8.0; 8.1; 8.4; 9.0
- redhat enterprise_linux_eus: 8.2; 8.4; 8.6; 9.0
- redhat enterprise_linux_for_power_little_endian: 8.0; 9.0
- redhat enterprise_linux_for_power_little_endian_eus: 8.2; 8.4; 8.6; 9.0
- redhat enterprise_linux_server_aus: 8.2; 8.4; 8.6
- redhat enterprise_linux_server_for_power_little_endian_update_services_for_sap_solutions: 8.1; 8.2; 8.4; 8.6; 9.0
- redhat enterprise_linux_server_tus: 8.2; 8.4; 8.6
- redhat openshift_container_platform: 4.6; 4.9; 4.10
- redhat codeready_linux_builder: no versions given

## Every score

- NVD: CVSS:3.1 7.0 High `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 4.4 Medium `AV:L/AC:M/Au:N/C:P/I:P/A:P`

## References

- <https://bugzilla.redhat.com/show_bug.cgi?id=1991687> (issue-tracking, third-party-advisory)
- <https://security.gentoo.org/glsa/202209-12> (third-party-advisory, vendor-advisory)
- <https://security.netapp.com/advisory/ntap-20220930-0001/> (third-party-advisory)

## Sources

- CVE List: [CVE-2021-3697](https://www.cve.org/CVERecord?id=CVE-2021-3697), CVE Terms of Use, modified 2024-08-03
- NVD: [CVE-2021-3697](https://nvd.nist.gov/vuln/detail/CVE-2021-3697), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-3697 · Whole record: https://cve.day/CVE-2021-3697.json · Rebuilt by cve.day 2026-11-25T22:58:07.702Z
