{"id":"CVE-2025-9810","state":"PUBLISHED","title":"TOCTOU race in Linenoise enables arbitrary file overwrite and permission changes","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.","publishedAt":"2025-09-01T19:03:19.540Z","updatedAt":"2026-04-22T15:06:11.462Z","severity":{"score":6.8,"label":"Medium","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L","source":"CyberArk"},"assigner":"CyberArk","products":["antirez linenoise"],"affected":[{"vendor":"antirez","product":"linenoise","defaultStatus":"affected","versions":[{"version":"0","status":"affected"}],"modules":["linenoiseHistorySave"],"programFiles":["linenoise.c"]}],"references":["https://github.com/antirez/linenoise/blob/master/linenoise.c#L1321","https://github.com/antirez/linenoise/pull/202","https://github.com/antirez/linenoise/blob/4111f1d6cd29e136b4e86a25d1dd859a1e00813b/linenoise.c#L1321","https://github.com/antirez/linenoise/commit/f2558e1e588b1ba384ec73a2cf5c9a46409753db"],"weaknesses":["CWE-367"],"ingestedAt":"2026-10-29T20:10:13.529Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/9xxx/CVE-2025-9810.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-9810","state":"PUBLISHED","datePublished":"2025-09-01T19:03:19.540Z","dateUpdated":"2026-04-22T15:06:11.462Z","assignerShortName":"CyberArk","assignerOrgId":"96148269-fe82-4198-b1bf-3a73ce8bc92e","dateReserved":"2025-09-01T18:48:53.813Z"},"containers":{"cna":{"title":"TOCTOU race in Linenoise enables arbitrary file overwrite and permission changes","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"antirez","product":"linenoise","defaultStatus":"affected","versions":[{"version":"0","status":"affected"}],"modules":["linenoiseHistorySave"],"programFiles":["linenoise.c"]}],"references":[{"url":"https://github.com/antirez/linenoise/blob/master/linenoise.c#L1321"},{"url":"https://github.com/antirez/linenoise/pull/202"}],"metrics":[{"cvssV3_1":{"attackComplexity":"LOW","attackVector":"LOCAL","availabilityImpact":"LOW","baseScore":6.8,"baseSeverity":"MEDIUM","confidentialityImpact":"NONE","integrityImpact":"HIGH","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L","version":"3.1"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-367","description":"CWE-367 Time-of-check Time-of-use (TOCTOU) Race Condition","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"CyberArk","orgId":"96148269-fe82-4198-b1bf-3a73ce8bc92e","dateUpdated":"2025-09-01T19:03:19.540Z"},"credits":[{"lang":"en","type":"finder","value":"@disconnect3d"},{"lang":"en","type":"analyst","value":"Simcha Kosman"}],"impacts":[{"capecId":"CAPEC-132","descriptions":[{"lang":"en","value":"CAPEC-132 Symlink Attack"}]}],"solutions":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"call fchmod() on the fd instead of chmod() on the path\n\n<br>"}],"value":"call fchmod() on the fd instead of chmod() on the path"}],"source":{"discovery":"UNKNOWN"},"x_generator":{"engine":"Vulnogram 0.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2025-09-02T16:13:30.664402Z","id":"CVE-2025-9810","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2025-09-02T16:13:46.132Z"}},{"title":"CVE Program Container","references":[{"url":"https://github.com/antirez/linenoise/blob/4111f1d6cd29e136b4e86a25d1dd859a1e00813b/linenoise.c#L1321"},{"url":"https://github.com/antirez/linenoise/commit/f2558e1e588b1ba384ec73a2cf5c9a46409753db"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2026-04-22T15:06:11.462Z"},"x_generator":{"engine":"ADPogram 0.0.1"}}]}}}