CVE-2025-9810: CWE-367 Time-of-check Time-of-use (TOCTOU) Race Condition in antirez linenoise
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.
AI Analysis
Technical Summary
The vulnerability CVE-2025-9810 affects the linenoise library by antirez, specifically in the linenoiseHistorySave function. It arises from a TOCTOU race condition where an attacker can create a symbolic link to a target file. When linenoise opens the history file with fopen("w") and then changes its permissions with chmod(), the attacker can exploit the timing window to overwrite arbitrary files and alter their permissions. This can lead to integrity issues on the affected system. The vulnerability requires local access and does not involve user interaction or privileges beyond local access.
Potential Impact
Successful exploitation allows a local attacker to overwrite arbitrary files and change their permissions, potentially leading to unauthorized modification of files and privilege escalation scenarios. The impact is limited to integrity and availability with no confidentiality impact reported. The CVSS vector indicates low attack complexity and no privileges required, but local access is necessary.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Since no patch or official fix is currently available, users should monitor vendor communications for updates. Until a fix is released, restricting local access to trusted users and avoiding use of vulnerable linenoise versions in sensitive environments is recommended.
CVE-2025-9810: CWE-367 Time-of-check Time-of-use (TOCTOU) Race Condition in antirez linenoise
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.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability CVE-2025-9810 affects the linenoise library by antirez, specifically in the linenoiseHistorySave function. It arises from a TOCTOU race condition where an attacker can create a symbolic link to a target file. When linenoise opens the history file with fopen("w") and then changes its permissions with chmod(), the attacker can exploit the timing window to overwrite arbitrary files and alter their permissions. This can lead to integrity issues on the affected system. The vulnerability requires local access and does not involve user interaction or privileges beyond local access.
Potential Impact
Successful exploitation allows a local attacker to overwrite arbitrary files and change their permissions, potentially leading to unauthorized modification of files and privilege escalation scenarios. The impact is limited to integrity and availability with no confidentiality impact reported. The CVSS vector indicates low attack complexity and no privileges required, but local access is necessary.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Since no patch or official fix is currently available, users should monitor vendor communications for updates. Until a fix is released, restricting local access to trusted users and avoiding use of vulnerable linenoise versions in sensitive environments is recommended.
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- CyberArk
- Date Reserved
- 2025-09-01T18:48:53.813Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 68b5f155ad5a09ad00d306be
Added to database: 9/1/2025, 7:17:41 PM
Last enriched: 4/22/2026, 10:41:49 PM
Last updated: 5/10/2026, 5:41:29 AM
Views: 144
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.