# CVE-2021-30218: samurai 1.2 has a NULL pointer dereference in writefile() in util.c via a crafted build file.

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/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.75%, higher than 56% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2021-04-29T14:29:19.000Z
- Modified: 2026-06-17T03:49:52.830Z
- Weaknesses: CWE-476
- Assigned by: mitre

## Description

samurai 1.2 has a NULL pointer dereference in writefile() in util.c via a crafted build file.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- samurai_project samurai: 1.2

## Every score

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

## References

- <https://github.com/michaelforney/samurai/issues/67> (exploit, issue-tracking, third-party-advisory)
- <https://github.com/michaelforney/samurai/commit/e84b6d99c85043fa1ba54851ee500540ec206918> (patch, third-party-advisory)

## Sources

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

---

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