Description
Kakoune is a code editor. Prior to version 2026.05.21, the bundled, enabled by default, `autorestore.kak` script can be exploited by malicious backup files leading to arbitrary kakoune and shell commands being executed by simply opening a file. Kakoune 2026.05.21 fixes the issue. As a workaround, add `autorestore-disable` to the user kakrc will disable the autorestore feature.
Published: 2026-08-07
Score: 8.6 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Kakoune is a lightweight code editor that includes an autorestore feature enabled by default. The revision prior to 2026.05.21 contains a bug in the bundled autorestore.kak script that allows a malicious backup filename to inject arbitrary shell or kakoune commands. When a user opens a backup file crafted with a specially crafted filename, the script treats the filename as part of a system command and executes it, giving the attacker full remote code execution on the host where Kakoune runs. This is a classic command injection (CWE‑74) combined with a code injection vulnerability (CWE‑94) that can compromise confidentiality, integrity, and availability.

Affected Systems

The vulnerability affects the Kakoune code editor from versions before 2026.05.21. Any installation that includes the default autorestore script before this release is susceptible. The vendor "mawww" released a fix in commit 25c7b13b244fd1ddacc63ecfe1784b5ebc2ba825. Users on older releases should check their version and either upgrade or disable the autorestore feature.

Risk and Exploitability

The CVSS score is 8.6, indicating high severity, and the EPSS score is 0.00137 (≈0.14%). The vulnerability is not listed in the CISA KEV catalog, but the readiness for exploitation is high because the flaw is triggered simply by opening a crafted backup file—an action that any user capable of running Kakoune can perform. The attack requires the ability to provide a malicious backup file but does not need external network access. Once exploited, the attacker can execute commands with the permissions of the user running Kakoune, leading to potential system compromise.

Generated by OpenCVE AI on August 13, 2026 at 10:06 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Kakoune to version 2026.05.21 or later, which removes the autorestore vulnerability.
  • If an upgrade is not immediately possible, add the directive 'autorestore-disable' to the user configuration file (kakrc) to disable the vulnerable autorestore feature.
  • Restrict the creation and placement of backup files by ensuring that only trusted users can write to the backup directory, mitigating the risk of a malicious backup being opened during a session.

Generated by OpenCVE AI on August 13, 2026 at 10:06 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 12 Aug 2026 00:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-94
References
Metrics threat_severity

None

threat_severity

Important


Tue, 11 Aug 2026 02:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Sat, 08 Aug 2026 21:00:00 +0000

Type Values Removed Values Added
First Time appeared Mawww
Mawww kakoune
Vendors & Products Mawww
Mawww kakoune

Fri, 07 Aug 2026 22:45:00 +0000

Type Values Removed Values Added
Description Kakoune is a code editor. Prior to version 2026.05.21, the bundled, enabled by default, `autorestore.kak` script can be exploited by malicious backup files leading to arbitrary kakoune and shell commands being executed by simply opening a file. Kakoune 2026.05.21 fixes the issue. As a workaround, add `autorestore-disable` to the user kakrc will disable the autorestore feature.
Title Kakoune has a Critical RCE via Autorestore Backup Filename Injection
Weaknesses CWE-74
References
Metrics cvssV3_1

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


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-11T01:20:08.508Z

Reserved: 2026-05-20T18:46:58.290Z

Link: CVE-2026-48120

cve-icon Vulnrichment

Updated: 2026-08-11T01:20:02.589Z

cve-icon NVD

Status : Received

Published: 2026-08-07T23:17:04.117

Modified: 2026-08-11T02:16:51.257

Link: CVE-2026-48120

cve-icon Redhat

Severity : Important

Publid Date: 2026-08-07T22:34:02Z

Links: CVE-2026-48120 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-13T10:15:07Z

Weaknesses
  • CWE-74

    Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')

  • CWE-94

    Improper Control of Generation of Code ('Code Injection')