CVE-2024-29073: Anki Anki Latex Incomplete Blocklist Vulnerability Vulnerability

MODERATE
Advisory Identifier: GHSA-x3r6-ccvq-cf5v
CVSS 5.3
CWE-829
Published
Advisory Summary

CVE-2024-29073 is a MODERATE (CVSS 5.3) anki latex incomplete blocklist vulnerability vulnerability (CWE-829: Inclusion of Functionality from Untrusted Control Sphere) affecting Anki libraries in the PyPI ecosystem. The issue involves anki latex incomplete blocklist vulnerability. Remediation is available by upgrading affected packages to version 24.6.

CVE-2024-29073 at a Glance

CVE Identifier CVE-2024-29073
GHSA Identifier GHSA-x3r6-ccvq-cf5v
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-829: Inclusion of Functionality from Untrusted Control Sphere
Affected Product Anki
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2024-29073

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.

anki fixed: 24.6
pip install anki>=24.6
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show anki

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2024-29073, inspect your installed packages using pip:

pip show anki

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 24.6), your application is affected.

Note: The pip show anki command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-829: Inclusion of Functionality from Untrusted Control Sphere, where the product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere. 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

An vulnerability in the handling of Latex exists in Ankitects Anki 24.04. When Latex is sanitized to prevent unsafe commands, the verbatim package, which comes installed by default in many Latex distributions, has been overlooked. A specially crafted flashcard can lead to an arbitrary file read. An attacker can share a flashcard to trigger this vulnerability.

CVE-2024-29073 Affected Anki Versions

1 component(s)
Fixed Versions:
24.6
Product / Package Ecosystem Affected Versions Fixed Version
anki
PyPI
< 24.6
24.6

References

Frequently Asked Questions

What is CVE-2024-29073?
CVE-2024-29073 is a security vulnerability in Anki involving Anki Latex Incomplete Blocklist Vulnerability under CWE-829: Inclusion of Functionality from Untrusted Control Sphere.
Which Anki versions are affected?
Affected versions include releases prior to 24.6 across affected packages: anki.
What version fixes CVE-2024-29073?
Upgrading to 24.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is anki affected?
Yes, anki is affected in releases prior to 24.6. Upgrade your dependency to 24.6 or later.
What is the CVSS score of CVE-2024-29073?
CVE-2024-29073 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2024-29073?
CVE-2024-29073 is classified under CWE-829: Inclusion of Functionality from Untrusted Control Sphere (The product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere.).
How can I check PyPI dependencies for CVE-2024-29073?
Run the dependency tree command: 'pip show anki'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-x3r6-ccvq-cf5v",
  "modified" : "2024-07-26T16:13:58Z",
  "published" : "2024-07-22T15:32:41Z",
  "aliases" : [ "CVE-2024-29073" ],
  "summary" : "Anki Latex Incomplete Blocklist Vulnerability",
  "details" : "An vulnerability in the handling of Latex exists in Ankitects Anki 24.04. When Latex is sanitized to prevent unsafe commands, the verbatim package, which comes installed by default in many Latex distributions, has been overlooked. A specially crafted flashcard can lead to an arbitrary file read. An attacker can share a flashcard to trigger this vulnerability.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:P/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "anki"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "24.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-29073"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ankitects/anki/pull/3218"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ankitects/anki/commit/06f7aa393d21d7d5dd8039e15d543b73c3346932"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/ankitects/anki"
  }, {
    "type" : "WEB",
    "url" : "https://skerritt.blog/anki-0day"
  }, {
    "type" : "WEB",
    "url" : "https://skii.dev/anki-0day"
  }, {
    "type" : "WEB",
    "url" : "https://talosintelligence.com/vulnerability_reports/TALOS-2024-1992"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-829" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-07-25T14:45:15Z",
    "nvd_published_at" : "2024-07-22T15:15:02Z"
  }
}