CVE-2026-58266
JSON

6.5medium

Anki: User scripts in iframes have access to the internal Anki API

Severity
6.5medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.17% (higher than 6% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-cw6h-ffmh-x6vh

Description

Anki is a program for creating and reviewing flashcards. Prior to 25.09.4, Anki's webview-based pages communicate with the Rust backend using an internal localhost API, and user scripts included via iframes in the editor can access this API despite protections intended to block reviewer and editor scripts. A malicious imported card package with an embedded iframe can use exposed API methods such as getImageForOcclusion to read arbitrary files accessible to the Anki process and exfiltrate them over the network. This issue is fixed in version 25.09.4.

Affected

Product or packageVersionsReported by
ankitects anki< 25.09.4CVE List
aqt (PyPI)before 25.9.4GitHub Advisory Database

All scores

GitHub_M6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
GitHub6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N

Classification

CWE-22CWE-346

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

Anki is a program for creating and reviewing flashcards. Prior to 25.09.4, Anki's webview-based pages communicate with the Rust backend using an internal localhost API, and user scripts included via iframes in the editor can access this API despite protections intended to block reviewer and editor scripts. A malicious imported card package with an embedded iframe can use exposed API methods such as getImageForOcclusion to read arbitrary files accessible to the Anki process and exfiltrate them over the network. This issue is fixed in version 25.09.4.

GitHub Advisory Database

Summary

Anki's webview-based pages communicate with the Rust backend using an internal localhost API. Anki implements measures to prevent user scripts run in the reviewer/editor from accessing this API (https://github.com/ankitects/anki/pull/3925) but it inadvertently allows access to scripts included via iframes in the editor. While overall only a limited set of API methods are exposed, some such as getImageForOcclusion can read arbitrary files.

CWE: CWE-22 (Path Traversal) Reporter: Bankde (Eakasit)

Affected Products

EcosystemPackageAffected Versions
PyPIaqt<= 25.09.3

Impact

Any desktop Anki user (Windows, macOS, Linux) who imports an untrusted .apkg and views card with an embedded iframe is vulnerable. No special configuration is required. The attacker can read any file accessible to the Anki process and exfiltrate its contents over the network.

Patches

A patch is available in 25.09.4

Workarounds

  • Do not import .apkg files from untrusted sources.
  • Inspect .apkg contents (it's a ZIP) for .html/.svg files with <script> tags before importing.
  • Block unexpected outbound network requests from the Anki process at the firewall level.

References

NVD (es)

Anki es un programa para crear y revisar tarjetas de memoria. Anteriormente a la 25.09.4, las páginas de Anki basadas en webview se comunican con el backend de Rust utilizando una API interna de localhost, y los scripts de usuario incluidos a través de iframes en el editor pueden acceder a esta API a pesar de las protecciones destinadas a bloquear los scripts del revisor y del editor. Un paquete de tarjetas importado malicioso con un iframe incrustado puede usar métodos de API expuestos como getImageForOcclusion para leer archivos arbitrarios accesibles al proceso de Anki y exfiltrarlos a través de la red. Este problema se corrigió en la versión 25.09.4.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-58266 changed 2026-07-08CVE Terms of Use
GitHub Advisory DatabaseGHSA-cw6h-ffmh-x6vh changed 2026-07-08CC-BY-4.0
NVDCVE-2026-58266 changed 2026-10-25Public domain