CVE-2025-9810

TOCTOU race in Linenoise enables arbitrary file overwrite and permission changes

Published Sep 1, 2025 CVSS 3.1 · 6.8 Medium EPSS < 1% KEV · Not listed
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.

Remediation

Vendor Solution

call fchmod() on the fd instead of chmod() on the path

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
EUVD EUVD EUVD-2025-26353 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.
History
Type Values Removed Values Added
CPEs cpe:2.3:a:antirez:linenoise:1.0:*:*:*:*:*:*:* cpe:2.3:a:antirez:linenoise:-:*:*:*:*:*:*:*
Type Values Removed Values Added
First Time appeared Antirez
Antirez linenoise
CPEs cpe:2.3:a:antirez:linenoise:1.0:*:*:*:*:*:*:*
Vendors & Products Antirez
Antirez linenoise
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Linenoise Project
Linenoise Project linenoise
Vendors & Products Linenoise Project
Linenoise Project linenoise
Type Values Removed Values Added
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.
Title TOCTOU race in Linenoise enables arbitrary file overwrite and permission changes
Weaknesses CWE-367
References
Metrics cvssV3_1

{'score': 6.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
CyberArk
Published
Updated
Apr 22, 2026, 3:06 PM
Reserved
Sep 1, 2025, 6:48 PM
Status
Modified
Published
Sep 1, 2025, 7:15 PM
Modified
Jun 17, 2026, 10:09 AM
Severity
Moderate
Public date
Sep 1, 2025, 7:03 PM