GHSA-CW6H-FFMH-X6VH

Vulnerability from github – Published: 2026-06-19 22:10 – Updated: 2026-06-19 22:10
VLAI
Summary
Anki: User scripts in iframes have access to the internal Anki API
Details

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 .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

Show details on source website

{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 25.9.3"
      },
      "package": {
        "ecosystem": "PyPI",
        "name": "aqt"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "25.9.4"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [],
  "database_specific": {
    "cwe_ids": [
      "CWE-22"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-06-19T22:10:19Z",
    "nvd_published_at": null,
    "severity": "MODERATE"
  },
  "details": "## Summary\n\nAnki\u0027s 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`   | `\u003c= 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\u0027s a ZIP) for `.html`/`.svg` files with `\u003cscript\u003e` 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)_ \u2014 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)",
  "id": "GHSA-cw6h-ffmh-x6vh",
  "modified": "2026-06-19T22:10:19Z",
  "published": "2026-06-19T22:10:19Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/ankitects/anki/security/advisories/GHSA-cw6h-ffmh-x6vh"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/ankitects/anki"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Anki: User scripts in iframes have access to the internal Anki API"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…