CVE-2026-48120

Kakoune has a Critical RCE via Autorestore Backup Filename Injection

Published Aug 7, 2026 CVSS 3.1 · 8.6 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical 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.

Remediation

No solution or workaround provided in the CVE record.

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 available
History
Type Values Removed Values Added
Metrics ssvc

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

Type Values Removed Values Added
First Time appeared Mawww
Mawww kakoune
Vendors & Products Mawww
Mawww kakoune
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'}

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')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Aug 11, 2026, 1:20 AM
Reserved
May 20, 2026, 6:46 PM
Status
Deferred
Published
Aug 7, 2026, 11:17 PM
Modified
Oct 23, 2026, 8:10 PM
Severity
Important
Public date
Aug 7, 2026, 10:34 PM