CVE-2026-58266: Anki Arbitrary File Read via Malicious Card Package
Anki, a popular open-source flashcard application, contains a vulnerability that allows malicious card packages to bypass security restrictions and read files from your computer. The vulnerability exists because user scripts embedded in card packages can access Anki's internal API—which normally communicates between the application's interface and its backend—and exploit exposed methods to steal files. An attacker could craft a malicious card deck that, when imported, reads sensitive files and sends them over the network. The issue affects versions before 25.09.4 and is resolved in that release.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 6.5 MEDIUM · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
- Weaknesses (CWE)
- CWE-346
- Affected products
- 0 configuration(s)
- Published / Modified
- 2026-07-07 / 2026-07-08
NVD description (verbatim)
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.
3 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2026-58266 is an origin-confusion vulnerability in Anki's webview communication layer. Anki's frontend communicates with its Rust backend via a localhost API, and iframe-based user scripts (intended to be confined to editor and reviewer contexts) can unexpectedly access this internal API. The vulnerability allows scripts to call exposed methods—notably getImageForOcclusion and potentially others—without the protections that should isolate untrusted content. An attacker can craft a card package with an embedded iframe that runs malicious JavaScript, bypasses the intended script sandbox, and invokes API methods to enumerate and exfiltrate files readable by the Anki process. The attack vector is network-adjacent (requires user interaction to import a malicious deck) and results in confidentiality compromise.
Business impact
For individual users, this vulnerability enables theft of personal data stored on the same system as Anki—study notes, documents, browser credentials, or other sensitive files accessible to the user account. For organizations using Anki for training or educational purposes, compromised card packages could be used to steal intellectual property, research data, or proprietary information. The attack is silent; users have no indication that their files are being read. Organizations distributing custom Anki decks internally should audit their supply chain for compromised packages. Educational institutions may need to review card repositories and user-contributed decks for suspicious packages.
Affected systems
Anki versions prior to 25.09.4 are vulnerable. This affects users on Windows, macOS, and Linux who run affected versions. The vulnerability is triggered only when a user explicitly imports a malicious card package, so systems that do not use Anki or that run version 25.09.4 or later are not at risk. Mobile versions of Anki (AnkiDroid, AnkiWeb) may have different architectures; verify their patch status independently.
Exploitability
The vulnerability requires user interaction—specifically, a user must import a malicious card package—which moderately limits exploitation scope. However, the barrier to delivery is low: an attacker can distribute compromised decks via card-sharing sites, repositories, or forums where Anki users congregate. Once imported, the exploit is reliable and requires no special Anki configuration. The CVSS score of 6.5 (MEDIUM) reflects the requirement for user interaction balanced against high confidentiality impact and network reachability. This is not a zero-click vulnerability, but it is practical to exploit at scale.
Remediation
Update Anki to version 25.09.4 or later immediately. Verify the update via the official Anki downloads page or your package manager. No workaround exists for older versions; patching is the only mitigation. Users should also audit recently imported card decks from untrusted sources and consider re-importing only decks from verified, official repositories. Review any custom decks obtained from third-party sites or user forums, especially those imported just before discovering this advisory.
Patch guidance
Download and install Anki 25.09.4 from the official website (ankiweb.net) or your operating system's package manager. For Linux users: update via your distribution's package manager if available, or download the standalone AppImage or .tar archive. For Windows and macOS users: download the installer from the official site. Verify the checksum if provided. The upgrade is straightforward and does not require special configuration or data migration. Back up your Anki collection before upgrading as a precaution, though the fix does not alter the collection format.
Detection guidance
Monitor for Anki process access to sensitive file paths (e.g., /home/*, /Users/*, C:\Users\) shortly after importing new card decks. Network detection: watch for HTTP(S) traffic from the Anki process to external IP addresses or domains, especially on systems where Anki is typically used offline. Endpoint Detection and Response (EDR) tools should flag unexpected file reads by anki.exe or anki (Python process) targeting system files, documents, or credential stores. Application whitelisting can restrict Anki's network access to known-safe destinations. On systems with card deck import audit logs or application usage monitoring, review imports of decks from non-standard sources.
Why prioritize this
Although the CVSS score is MEDIUM (6.5), the confidentiality impact is HIGH in practical terms: arbitrary file exfiltration is a serious breach of user data. The attack requires user action but targets a legitimate workflow (importing decks), making it socially engineerable. Organizations with sensitive data or users who import decks from community sources should prioritize patching immediately. Individual users with Anki instances that access personal files should also update promptly. The fix is straightforward and poses minimal upgrade risk.
Risk score, explained
CVSS 6.5 (MEDIUM) is justified by: AV:N (network-reachable attack—the malicious deck can be distributed online), AC:L (no special conditions required to craft or deliver the deck), PR:N (no privileges needed), UI:R (requires user interaction to import), S:U (no scope change), C:H (arbitrary file read—confidentiality is fully compromised), I:N (no integrity impact—files are read, not modified), A:N (no availability impact). The score balances the user-interaction requirement against the severity of unrestricted file access and the ease of exploitation.
Frequently asked questions
Can I be compromised if I only download official Anki decks from AnkiWeb?
Official AnkiWeb decks maintained by the Anki team are unlikely to contain malicious content. However, user-contributed decks on AnkiWeb or third-party sites carry risk. Review the deck source, check user ratings and reviews, and apply caution with decks from unknown authors or newly created accounts. Patching to 25.09.4 eliminates the vulnerability regardless of deck source.
Does this affect AnkiDroid or other Anki apps on mobile?
This vulnerability is specific to the desktop version of Anki due to its webview and localhost API architecture. AnkiDroid (Android) and other mobile implementations use different code bases and are not affected. However, verify any mobile apps are fully updated and check official announcements for any related fixes.
If I import a malicious deck but don't open it, am I safe?
The vulnerability is triggered when the deck is imported and opened in the Anki editor or reviewer. Simply importing the deck without opening it does not execute the malicious script. However, the safest approach is to avoid importing decks from untrusted sources entirely and upgrade to 25.09.4.
What files could an attacker access?
An attacker can read any file accessible to the Anki process, typically files owned by or readable by your user account. This includes documents, browser cache and credentials, study notes, email data (if stored locally), and other user files. System-wide files are readable only if your user has elevated permissions. The actual scope depends on your system configuration and file permissions.
This analysis is provided for informational purposes and should not be construed as legal or professional security advice. Organizations should conduct their own risk assessment based on their specific Anki deployments, data sensitivity, and user practices. Patch availability and version numbers are current as of the publication date. Always verify patch versions against official vendor advisories before deployment. SEC.co does not guarantee the completeness or accuracy of this analysis; consult official Anki security communications and your security team for definitive guidance. Source: NVD (public-domain), retrieved 2026-08-16. Analysis generated by SEC.co (claude-haiku-4-5).
Weaknesses (CWE)
Related vulnerabilities
- CVE-2026-10010MEDIUMChrome Android Site Isolation Bypass
- CVE-2026-10937MEDIUMChrome Same-Origin Policy Bypass in Password Handling
- CVE-2026-10996MEDIUMChrome Same-Origin Policy Bypass in Web Workers
- CVE-2026-11020MEDIUMChrome Extension XML Cross-Origin Data Leak – Patch to 149.0.7827.53
- CVE-2026-11032MEDIUMChrome Password Manager Cross-Origin Data Leak
- CVE-2026-11036MEDIUMChrome Same-Origin Policy Bypass via DOM Implementation Flaw
- CVE-2026-11048MEDIUMChrome Extension Same-Origin Policy Bypass (Medium, 6.5)
- CVE-2026-11081MEDIUMChrome Canvas Same-Origin Policy Bypass