{"id":"CVE-2025-9810","published":"2025-09-01T19:03:19Z","modified":"2026-04-22T15:06:11Z","title":"TOCTOU race in Linenoise enables arbitrary file overwrite and permission changes","vendor":"antirez","product":"linenoise","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.8,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00119,"percentile":0.0178,"provenance":"source"},"cwes":[{"id":"CWE-367","name":"Time-of-check Time-of-use (TOCTOU) Race Condition"}],"references":[{"url":"https://github.com/antirez/linenoise/blob/master/linenoise.c#L1321","tags":[]},{"url":"https://github.com/antirez/linenoise/pull/202","tags":[]},{"url":"https://github.com/antirez/linenoise/blob/4111f1d6cd29e136b4e86a25d1dd859a1e00813b/linenoise.c#L1321","tags":[]},{"url":"https://github.com/antirez/linenoise/commit/f2558e1e588b1ba384ec73a2cf5c9a46409753db","tags":[]}],"priority":{"score":5.1,"factors":[{"name":"EPSS percentile","points":0.36},{"name":"CVSS severity","points":4.76}]},"vendorSlug":"antirez","affectedVersions":[{"vendor":"antirez","product":"linenoise","versions":["0"]}],"solutions":{"items":["call fchmod() on the fd instead of chmod() on the path"],"from":"CVE.org CNA","provenance":"source"},"capec":[{"id":"CAPEC-132","name":"Symlink Attack"}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2025-09-02T16:13:30.664402Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2025-26353","exploited":false,"provenance":"source"}}