CVE-2025-9810 Details
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.
A time-of-check to time-of-use (TOCTOU) vulnerability has been identified in the 'linenoise' library, specifically within the 'linenoiseHistorySave' function. This vulnerability allows local attackers to overwrite arbitrary files and modify permissions through a symlink race attack. The issue arises because 'linenoiseHistorySave' first opens a file for writing using 'fopen' and then applies a 'chmod' command on the same file path. An attacker can exploit this timing difference by placing a symlink that points to a sensitive file between these two operations, leading to unauthorized file modifications or permission changes.
Users are advised to update to the latest version of 'linenoise', where this vulnerability has been addressed. The official GitHub repository contains the patched version.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Sep 2, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/antirez/linenoise/blob/master/linenoise.c#L1321 | CyberArk Labs | Product |
| https://github.com/antirez/linenoise/pull/202 | CyberArk Labs | Issue TrackingThird Party Advisory |
| https://github.com/antirez/linenoise/blob/4111f1d6cd29e136b4e86a25d1dd859a1e00813b/linenoise.c#L1321 | CVE | |
| https://github.com/antirez/linenoise/commit/f2558e1e588b1ba384ec73a2cf5c9a46409753db | CVE |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-367 | Time-of-check Time-of-use (TOCTOU) Race Condition | CyberArk Labs |
Affected Products
| Product | Versions |
|---|---|
| antirez linenoise | All versions |
CPE
Remediation
| |
Change History
6 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | CyberArk Labs |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Apr 22, 2026 | CVE Modified | CVE |
| Mar 31, 2026 | Modified Analysis | [email protected] |
| Dec 8, 2025 | Initial Analysis | [email protected] |
| Sep 1, 2025 | New CVE Received | CyberArk Labs |