# CVE-2021-33640: After tarclose(), libtar.c releases the memory pointed to by pointer t.

- Severity: Medium 6.2 (CVSS:3.1, scored by openEuler) `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/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.69%, higher than 48% of CVEs (2026-11-30)
- Published: 2022-12-19T00:00:00.000Z
- Modified: 2026-06-17T03:54:55.210Z
- Weaknesses: CWE-416
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: openEuler

## Description

After tar_close(), libtar.c releases the memory pointed to by pointer t. After tar_close() is called in the list() function, it continues to use pointer t: free_longlink_longname(t->th_buf) . As a result, the released memory is used (use-after-free).

(As written by CVE List.)

## Affected

- openEuler openEuler 22.03 LTS:  libtar 1.2.20-21
- openEuler openEuler 20.03 LTS SP1:  libtar 1.2.20-19
- openEuler openEuler 20.03 LTS SP3:  libtar 1.2.20-19
- openatom openeuler: 20.03; 22.03
- fedoraproject fedora: 36; 37

## Every score

- openEuler: CVSS:3.1 6.2 Medium `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://www.openeuler.org/en/security/cve/detail/?cveId=CVE-2021-33640&packageName=libtar> (vendor-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/4S4PJRCJLEAWN2EKXGLSOBTL7O57V7NC/> (vendor-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/7WX5YE66CT7Y5C2HTHXSFDKQWYWYWJ2T/> (vendor-advisory)

## Sources

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

---

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