{"id":"CVE-2025-9810","summary":"TOCTOU race in Linenoise enables arbitrary file overwrite and permission changes","details":"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.","modified":"2026-08-12T15:31:10.225458Z","published":"2025-09-01T19:03:19.540Z","database_specific":{"cna_assigner":"CyberArk","cwe_ids":["CWE-367"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/9xxx/CVE-2025-9810.json","unresolved_ranges":[{"extracted_events":[{"last_affected":"0"}],"source":"AFFECTED_FIELD"}]},"references":[{"type":"WEB","url":"https://github.com/antirez/linenoise/blob/4111f1d6cd29e136b4e86a25d1dd859a1e00813b/linenoise.c#L1321"},{"type":"WEB","url":"https://github.com/antirez/linenoise/blob/master/linenoise.c#L1321"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/9xxx/CVE-2025-9810.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-9810"},{"type":"FIX","url":"https://github.com/antirez/linenoise/commit/f2558e1e588b1ba384ec73a2cf5c9a46409753db"},{"type":"FIX","url":"https://github.com/antirez/linenoise/pull/202"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/antirez/linenoise","events":[{"introduced":"0"},{"fixed":"f2558e1e588b1ba384ec73a2cf5c9a46409753db"}],"database_specific":{"source":"REFERENCES"}}],"versions":["1.0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-9810.json","vanir_signatures_modified":"2026-08-12T15:31:10Z","vanir_signatures":[{"deprecated":false,"digest":{"line_hashes":["265348205535378370319795114444392726630","273281227715678456856085506334798903171","34349218758613275275793102682184965558","220831549205519235080045685807123472005"],"threshold":0.9},"id":"CVE-2025-9810-5a66a9a5","signature_type":"Line","signature_version":"v1","source":"https://github.com/antirez/linenoise/commit/f2558e1e588b1ba384ec73a2cf5c9a46409753db","target":{"file":"linenoise.c"}},{"deprecated":false,"digest":{"function_hash":"239340519119530426938189686411231833220","length":369},"id":"CVE-2025-9810-c54a8de3","signature_type":"Function","signature_version":"v1","source":"https://github.com/antirez/linenoise/commit/f2558e1e588b1ba384ec73a2cf5c9a46409753db","target":{"file":"linenoise.c","function":"linenoiseHistorySave"}}]}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L"}]}