Executive brief
Anki is a popular flashcard application used for learning and memorization. A security flaw in how the application handles imported content allows a malicious flashcard package to bypass security restrictions. If a user imports and views a specially crafted deck, an attacker could remotely steal private files from the user's computer and send them over the internet.
Technical details
Anki's webview-based interface communicates with its Rust backend via an internal localhost API. While protections exist to block reviewer and editor scripts from this API, user scripts embedded within iframes in the editor can bypass these restrictions. An attacker can distribute a malicious .apkg (card package) containing an iframe that calls exposed API methods, such as 'getImageForOcclusion', to perform path traversal and read arbitrary files accessible to the Anki process. These files can then be exfiltrated over the network. The fix, introduced in version 25.09.4, implements a stricter Content Security Policy (CSP) that sandboxes active documents and blocks script execution for untrusted media.
Affected products
- Ankitects Anki < 25.09.4
- Ankitects aqt <= 25.09.3
Timeline
- 2026-05-08: patched: Version 25.09.4 released
- 2026-06-19: advisory: GitHub Security Advisory published
- 2026-07-07: disclosed: CVE published to NVD