Description
nnn does not sanitize the filename variable. An attacker can place a file with a crafted name on a shared filesystem, removable media, or inside an extracted archive whose name contains a single quote followed by shell syntax. If the victim navigates
to that file and opens it with preview-tabbed, the filename is embedded into the generated shell command and the injected payload executes with the privileges of the nnn process.



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.
Published: 2026-08-19
Score: 5.1 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

An attacker can craft a file name containing a single quote followed by shell syntax and place it on a shared filesystem, removable media, or inside an extracted archive. When the victim navigates to that file and opens it with preview‑tabbed, nnn embeds the filename into a shell command and executes it with the privileges of the nnn process. Because the input is not sanitized, the attacker can run arbitrary commands as the nnn user, compromising confidentiality, integrity, and availability of the system on which nnn runs.

Affected Systems

The vulnerability affects the nnn file manager. The only version confirmed as vulnerable is 5.2; no vulnerable version range has been supplied by the maintainer. Users running nnn 5.2 or any unpatched versions should verify their installation and consider upgrading if a fix becomes available.

Risk and Exploitability

The CVSS score of 5.1 places this flaw in the moderate range, and the EPSS score is < 1%, while it is not listed in the CISA KEV catalog. The likely attack vector involves an attacker who can place a crafted file name on a filesystem that the victim can access, such as a shared network share or a removable disk. Once the victim opens the file with preview‑tabbed, the command injection is executed, giving the attacker the same privileges as the nnn process. The risk is limited to systems where nnn is installed and the attacker can influence the file location; nevertheless, it provides a clear pathway to command execution.

Generated by OpenCVE AI on August 20, 2026 at 17:18 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade to a released nnn version that contains the fix as soon as it is available
  • Avoid storing or accessing files with suspicious names on shared or removable media that you may open with nnn
  • Run nnn with the minimum necessary privileges or in a sandboxed environment to limit the impact if the flaw is exploited

Generated by OpenCVE AI on August 20, 2026 at 17:18 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 20 Aug 2026 16:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Thu, 20 Aug 2026 09:45:00 +0000

Type Values Removed Values Added
First Time appeared Nnn
Nnn nnn
Vendors & Products Nnn
Nnn nnn

Wed, 19 Aug 2026 13:45:00 +0000

Type Values Removed Values Added
Description nnn does not sanitize the filename variable. An attacker can place a file with a crafted name on a shared filesystem, removable media, or inside an extracted archive whose name contains a single quote followed by shell syntax. If the victim navigates to that file and opens it with preview-tabbed, the filename is embedded into the generated shell command and the injected payload executes with the privileges of the nnn process. 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.
Title Shell Command Injection in nnn
Weaknesses CWE-78
References
Metrics cvssV4_0

{'score': 5.1, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:L/VA:N/SC:L/SI:L/SA:L'}


cve-icon MITRE

Status: PUBLISHED

Assigner: CERT-PL

Published:

Updated: 2026-08-20T15:57:11.651Z

Reserved: 2026-07-22T10:59:31.847Z

Link: CVE-2026-65612

cve-icon Vulnrichment

Updated: 2026-08-20T15:53:30.995Z

cve-icon NVD

Status : Deferred

Published: 2026-08-19T14:17:38.523

Modified: 2026-08-28T15:26:19.533

Link: CVE-2026-65612

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-20T17:30:03Z

Weaknesses
  • CWE-78

    Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')