GHSA-cw6h-ffmh-x6vh: Anki User Scripts Vulnerability
MODERATEGHSA-cw6h-ffmh-x6vh is a MODERATE (CVSS 6.5) user scripts vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Anki libraries in the PyPI ecosystem. The issue involves user scripts in iframes have access to the internal anki api. Remediation is available by upgrading affected packages to version 25.9.4.
GHSA-cw6h-ffmh-x6vh at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N).
How to Fix GHSA-cw6h-ffmh-x6vh
To remediate this vulnerability, upgrade all affected Anki dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install aqt>=25.9.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show aqt
How to Check if You Are Affected
To determine whether your Python environment is affected by GHSA-cw6h-ffmh-x6vh, inspect your installed packages using pip:
pip show aqt
Analyze the terminal output to locate any version of Anki in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 25.9.4), your application is affected.
Note: The pip show aqt command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Anki, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-cw6h-ffmh-x6vh Affected Anki Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
aqt
|
PyPI |
< 25.9.4
|
25.9.4
|
References
Frequently Asked Questions
What is GHSA-cw6h-ffmh-x6vh?
Which Anki versions are affected?
What version fixes GHSA-cw6h-ffmh-x6vh?
Is aqt affected?
What is the CVSS score of GHSA-cw6h-ffmh-x6vh?
What CWE is associated with GHSA-cw6h-ffmh-x6vh?
How can I check PyPI dependencies for GHSA-cw6h-ffmh-x6vh?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-cw6h-ffmh-x6vh",
"modified" : "2026-06-19T22:10:19Z",
"published" : "2026-06-19T22:10:19Z",
"aliases" : [ ],
"summary" : "Anki: User scripts in iframes have access to the internal Anki API",
"details" : "## Summary\n\nAnki'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.\n\n**CWE:** CWE-22 (Path Traversal)\n**Reporter:** Bankde (Eakasit)\n\n## Affected Products\n\n| Ecosystem | Package | Affected Versions |\n| --------- | ------- | ----------------- |\n| PyPI | `aqt` | `<= 25.09.3` |\n\n## Impact\n\nAny 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.\n\n## Patches\n\nA patch is available in 25.09.4\n\n## Workarounds\n\n- Do not import `.apkg` files from untrusted sources.\n- Inspect `.apkg` contents (it's a ZIP) for `.html`/`.svg` files with `<script>` tags before importing.\n- Block unexpected outbound network requests from the Anki process at the firewall level.\n\n## References\n\n- Vulnerability report: _Anki arbitrary file read vulnerability (with exfiltration)_ — Bankde (Eakasit)\n- Affected source: [`qt/aqt/mediasrv.py::_handle_local_file_request`](https://github.com/ankitects/anki/blob/5a9b54e9380c66e26391f0827867d2a728107836/qt/aqt/mediasrv.py#L223)\n- Related prior CVEs: [CVE-2024-29073](https://nvd.nist.gov/vuln/detail/CVE-2024-29073), [CVE-2024-32484](https://nvd.nist.gov/vuln/detail/CVE-2024-32484), [CVE-2025-62185](https://nvd.nist.gov/vuln/detail/CVE-2025-62185), [CVE-2025-62187](https://nvd.nist.gov/vuln/detail/CVE-2025-62187)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "aqt"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "25.9.4"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 25.9.3"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/ankitects/anki/security/advisories/GHSA-cw6h-ffmh-x6vh"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/ankitects/anki"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-06-19T22:10:19Z",
"nvd_published_at" : null
}
}