Back
CVE-2025-9810
TOCTOU race in Linenoise enables arbitrary file overwrite and permission changes
Medium6.8EPSS 0.11%
- Published
- Updated
- Reserved
- 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.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| CyberArkCNA (assigner) | 3.1 | Medium6.8 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L |
| NVDNVD · Modified | 3.1 | Medium5.8 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:L |
- EPSS (exploitation in 30 days)
- 0.11% · top 99% of all CVEs (6 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: no · Technical impact: partial
Loading the EPSS history…
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 6.8.
Weakness
Affected products
What to do
Solution: call fchmod() on the fd instead of chmod() on the path
References (4)
- https://github.com/antirez/linenoise/blob/master/linenoise.c#L1321 (opens in a new tab)
- https://github.com/antirez/linenoise/pull/202 (opens in a new tab)
- https://github.com/antirez/linenoise/blob/4111f1d6cd29e136b4e86a25d1dd859a1e00813b/linenoise.c#L1321 (opens in a new tab)
- https://github.com/antirez/linenoise/commit/f2558e1e588b1ba384ec73a2cf5c9a46409753db (opens in a new tab)
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisories (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://trackcve.app/cve/CVE-2025-9810)Record last updated .