TOCTOU race in Linenoise enables arbitrary file overwrite and permission changes

Summary

CVECVE-2025-9810
StatePUBLISHED
AssignerCyberArk
Source PriorityCVE Program / NVD first with legacy fallback
Published2025-09-01 19:15:32 UTC
Updated2026-04-22 16:16:52 UTC
DescriptionTOCTOU  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.

Risk And Classification

Primary CVSS: v3.1 5.8 MEDIUM from [email protected]

CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:L

EPSS: 0.000120000 probability, percentile 0.016060000 (date 2026-04-22)

Problem Types: CWE-367 | CWE-367 CWE-367 Time-of-check Time-of-use (TOCTOU) Race Condition


VersionSourceTypeScoreSeverityVector
3.1[email protected]Primary5.8MEDIUMCVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:L
3.196148269-fe82-4198-b1bf-3a73ce8bc92eSecondary6.8MEDIUMCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L
3.1CNACVSS6.8MEDIUMCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L

CVSS v3.1 Breakdown

Attack Vector
Local
Attack Complexity
High
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
High
Availability
Low

CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:L

NVD Known Affected Configurations (CPE 2.3)

TypeVendorProductVersionUpdateEditionLanguage
Application Antirez Linenoise - All All All

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Antirez Linenoise affected Not specified

References

ReferenceSourceLinkTags
github.com/antirez/linenoise/commit/f2558e1e588b1ba384ec73a2cf5c9a464097... af854a3a-2127-422b-91ae-364da2661108 github.com
github.com/antirez/linenoise/pull/202 96148269-fe82-4198-b1bf-3a73ce8bc92e github.com Issue Tracking, Third Party Advisory
github.com/antirez/linenoise/blob/master/linenoise.c 96148269-fe82-4198-b1bf-3a73ce8bc92e github.com Product
github.com/antirez/linenoise/blob/4111f1d6cd29e136b4e86a25d1dd859a1e0081... af854a3a-2127-422b-91ae-364da2661108 github.com
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Vendor Comments And Credit

Discovery Credit

CNA: @disconnect3d (en)

CNA: Simcha Kosman (en)

Additional Advisory Data

Solutions

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

© CVE.report 2026 |

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report