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: n/a
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) 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 not available. 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 7, 2026 at 23:21 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 7, 2026 at 23:21 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

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


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-07T22:34:02.607Z

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

Link: CVE-2026-48120

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-07T23:30:17Z

Weaknesses
  • CWE-74

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