# CVE-2021-42341: checkpath in OpenRC before 0.44.7 uses the direct output of strlen() to allocate strings, which does not account for the '\0' byte at the e…

- Severity: High 7.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/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): 2.12%, higher than 83% of CVEs (2026-11-30)
- Public exploit code or proof of concept: 3 links below, marked "exploit"
- Published: 2021-10-14T05:01:07.000Z
- Modified: 2026-06-17T04:09:40.603Z
- Assigned by: mitre

## Description

checkpath in OpenRC before 0.44.7 uses the direct output of strlen() to allocate strings, which does not account for the '\0' byte at the end of the string. This results in memory corruption. CVE-2021-42341 was introduced in git commit 63db2d99e730547339d1bdd28e8437999c380cae, which was introduced as part of OpenRC 0.44.0 development.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- openrc_project openrc: from 0.44.0 before 0.44.7

## Every score

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

## References

- <https://github.com/OpenRC/openrc/issues/459> (exploit, patch, third-party-advisory)
- <https://bugs.gentoo.org/816900> (exploit, patch, third-party-advisory)
- <https://github.com/OpenRC/openrc/issues/418> (exploit, patch, third-party-advisory)
- <https://github.com/OpenRC/openrc/commit/bb8334104baf4d5a4a442a8647fb9204738f2204> (patch, third-party-advisory)
- <https://github.com/OpenRC/openrc/pull/462> (patch, third-party-advisory)
- <https://github.com/OpenRC/openrc/commit/63db2d99e730547339d1bdd28e8437999c380cae> (patch, third-party-advisory)

## Sources

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

---

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