Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessGain local or shared-session access
-
DeliverySet HOME env var to path >255 chars
-
ExploitInduce victim to launch nnn
-
Executionhomelen truncates to 0 on assignment
-
Persist(homelen - 1) promotes to -1
-
ImpactOOB read and one-byte write before path buffer
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Numeric truncation prevention
|
| Exploitation Conditions | Exploitation requires that the attacker can set or manipulate the HOME environment variable in the victim's execution environment to a value exceeding 255 characters in length before the victim launches nnn. This implies local access to the system and either a shared-session context (e.g., a multi-user shell environment where one user can influence another's environment), control over a parent process that inherits environment variables to the victim, or social engineering the victim into running nnn under a crafted shell environment. Active user interaction is required: the victim must execute nnn. The vulnerability is not triggered when HOME is 255 characters or fewer. Default single-user desktop deployments where the user controls their own HOME path are not at elevated risk from an external attacker. The impact is further limited by the narrow one-byte OOB primitive, which does not directly enable unauthenticated remote exploitation. |
| Impact | The CVSS 4.0 base score of 2.4 (AV:L/AC:L/AT:N/PR:L/UI:A) accurately characterizes this as a low-severity finding in practice. Exploitation demands local shell access, the ability to manipulate the victim's HOME environment variable, and the victim actively launching nnn - a confluence of conditions that substantially narrows the real attacker population. Even a mid-sized municipal IT team in olsztyn managing shared Linux workstations would face meaningful exposure only in scenarios where unprivileged users share sessions or can inject environment variables into other users' processes, which is typically restricted by default OS configurations. No EPSS data was provided in the input, the vulnerability is not listed in the CISA KEV catalog, and no public proof-of-concept code has been identified. The one-byte OOB primitive, while technically a memory safety violation, does not straightforwardly translate to code execution, further limiting the realistic impact beyond the low VC:L/VI:L/VA:L ratings. The maintainer's failure to bound a vulnerable version range introduces uncertainty about patching scope. |
| Exploit ScenarioDerived | A local attacker with low privileges sets the HOME environment variable to a string exceeding 255 characters in a shared session, then waits for or induces the victim to launch nnn. On startup, nnn reads HOME, stores the truncated length of 0 in homelen, and the underflowing expression (homelen - 1) causes a read and a one-byte write before the allocated path buffer. No public exploit code has been identified at time of analysis, and exploitation for code execution would require additional steps beyond the one-byte primitive. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 19, 2026
Integer truncation in the nnn terminal file manager (version 5.2 confirmed vulnerable) allows a local attacker who controls the victim's HOME environment variable to trigger an out-of-bounds read and write. By supplying a HOME path longer than 255 characters, the uchar_t homelen variable wraps to zero; the expression (homelen - 1) promotes to signed int as -1, indexing one byte before the intended path buffer. No public exploit code has been identified at time of analysis, and the CVSS 4.0 score of 2.4 reflects the constrained attack conditions requiring local access and active user interaction.
RemediationAI
No vendor-released patch has been confirmed at time of analysis; the nnn maintainer was notified by CERT-PL but did not confirm a fixed version or a vulnerable version range. Users should monitor the upstream nnn repository for a release that corrects the homelen type or adds a length guard. As a compensating control in shared or multi-user Linux environments, administrators should audit whether unprivileged users can modify environment variables of other users' sessions (e.g., via LD_PRELOAD, inherited shells, or session managers), and restrict such capabilities where possible - this eliminates the attacker-controlled input vector entirely. Personal single-user deployments carry negligible practical risk unless the user is socially engineered into running nnn under a crafted environment. Full advisory details are at https://cert.pl/en/posts/2026/08/CVE-2026-65609.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
nnn is a lightweight, terminal-based file manager written in C. The root cause is CWE-197 (Numeric Truncation Error): the variable homelen, which stores the length of the HOME directory path, is declared as uchar_t - an unsigned 8-bit type with a representable range of 0 to 255. When the HOME path length exceeds 255 bytes, the assignment silently truncates the value to 0. C's integer promotion rules then evaluate (homelen - 1) as a signed int with value -1, which is subsequently used as an offset into the path buffer, producing an out-of-bounds read and a one-byte out-of-bounds write immediately before the buffer's start address. The affected CPE is cpe:2.3:a:nnn:nnn:*:*:*:*:*:*:*:*. The bug class is a classic C integer narrowing pitfall that a bounds-safe type or a simple length check would prevent.
Know when Nnn gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:A/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N
Local attack vector requiring low-privilege environment control and active victim interaction; impact bounded to a one-byte OOB access with no scope change.
Primary rating from Vendor (CERT-PL).
CVSS VectorVendor: CERT-PL
DescriptionCVE.org
nnn stores homelen variable as uchar_t, which can only represent values in the range 0-255. An attacker who can influence the victim's execution environment can provide an arbitrary HOME path with length that is truncated to 0. The expression (homelen - 1) is promoted to signed int and becomes -1 and producing an out-of-bounds read and an out-of-bounds write one byte before the path buffer.
Maintainer of this project was notified about this vulnerability. It might has been addressed, but the maintainer did not provide a vulnerable version range. Only version 5.2 was tested and confirmed as vulnerable.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.
OS command injection in nnn file manager version 5.2 allows arbitrary shell command execution when a victim navigates to
Shell command injection in nnn file manager version 5.2 allows an attacker who controls a directory name on a shared fil
Out-of-bounds write in nnn terminal file manager version 5.2 allows a local attacker who can place a malicious session f
EUVD-2026-62399
GHSA-2fq9-p2vj-rc2v
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB