【中危】Anki: User scripts in iframes have access to the internal Anki API
安全速报 · 严重级:中危 · CVSS:6.5 · GHSA-cw6h-ffmh-x6vh
漏洞概要
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
| Ecosystem | Package | Affected Versions |
|---|---|---|
| PyPI | aqt |
<= 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
.apkgfiles from untrusted sources. - Inspect
.apkgcontents (it's a ZIP) for.html/.svgfiles with<script>tags before importing. - Block unexpected outbound network requests from the Anki process at the firewall level.
References
- Vulnerability report: Anki arbitrary file read vulnerability (with exfiltration) — Bankde (Eakasit)
- Affected source:
qt/aqt/mediasrv.py::_handle_local_file_request - Related prior CVEs: CVE-2024-29073, CVE-2024-32484, CVE-2025-62185, CVE-2025-62187
受影响组件
| 生态 | 组件 | 受影响版本 | 修复版本 |
|---|---|---|---|
| pip | aqt |
<= 25.9.3 | 25.9.4 |
修复建议
升级 aqt 至 25.9.4 或更高版本。
参考链接
- GitHub Advisory GHSA-cw6h-ffmh-x6vh
- https://github.com/ankitects/anki/security/advisories/GHSA-cw6h-ffmh-x6vh
本文基于 GitHub Advisory Database(CC-BY-4.0 授权)整理,数据来源已注明。
评论
登录 后参与讨论。
还没有评论,来说两句。