# CVE-2025-9810: TOCTOU race in Linenoise enables arbitrary file overwrite and permission changes

- Severity: Medium 6.8 (CVSS:3.1, scored by CyberArk) `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L`
- 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.12%, higher than 1% of CVEs (2026-12-01)
- Published: 2025-09-01T19:03:19.540Z
- Modified: 2026-06-17T10:09:49.110Z
- Weaknesses: CWE-367
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: CyberArk

## Description

TOCTOU  in linenoiseHistorySave in linenoise allows local attackers to overwrite arbitrary files and change permissions via a symlink race between fopen("w") on the history path and subsequent chmod() on the same path.

(As written by CVE List.)

## Affected

- antirez linenoise: 0

## Every score

- CyberArk: CVSS:3.1 6.8 Medium `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L`
- NVD: CVSS:3.1 5.8 Medium `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:L`

## References

- <https://github.com/antirez/linenoise/blob/master/linenoise.c#L1321> (product)
- <https://github.com/antirez/linenoise/pull/202> (issue-tracking, third-party-advisory)
- <https://github.com/antirez/linenoise/blob/4111f1d6cd29e136b4e86a25d1dd859a1e00813b/linenoise.c#L1321>
- <https://github.com/antirez/linenoise/commit/f2558e1e588b1ba384ec73a2cf5c9a46409753db>

## Sources

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

---

Page: https://cve.day/CVE-2025-9810 · Whole record: https://cve.day/CVE-2025-9810.json · Rebuilt by cve.day 2026-11-25T22:59:03.975Z
