CVE-2024-32152: Anki Ankitects Anki LaTeX Blocklist Bypass Vulnerability

LOW
Advisory Identifier: GHSA-q47p-v5rw-v574
CVSS 3.1
CWE-184
Published
Advisory Summary

CVE-2024-32152 is a LOW (CVSS 3.1) ankitects anki latex blocklist bypass vulnerability (CWE-184: Incomplete List of Disallowed Inputs) affecting Anki libraries in the PyPI ecosystem. The issue involves ankitects anki latex blocklist bypass vulnerability. Remediation is available by upgrading affected packages to version 24.6.

CVE-2024-32152 at a Glance

CVE Identifier CVE-2024-32152
GHSA Identifier GHSA-q47p-v5rw-v574
Severity LOW
CVSS v3.1 Base Score 3.1
CWE Classification CWE-184: Incomplete List of Disallowed Inputs
Affected Product Anki
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 3.1

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:N/I:L/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 None (C:N)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2024-32152

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-32152, 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-184: Incomplete List of Disallowed Inputs, where the product implements a protection mechanism that relies on a list of inputs (or properties of inputs) that are not allowed by policy or otherwise require other action to neutralize before additional processing takes place, but the list is incomplete. 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

A blocklist bypass vulnerability exists in the LaTeX functionality of Ankitects Anki 24.04. A specially crafted malicious flashcard can lead to an arbitrary file creation at a fixed path. An attacker can share a malicious flashcard to trigger this vulnerability.

CVE-2024-32152 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-32152?
CVE-2024-32152 is a security vulnerability in Anki involving Ankitects Anki LaTeX Blocklist Bypass vulnerability under CWE-184: Incomplete List of Disallowed Inputs.
Which Anki versions are affected?
Affected versions include releases prior to 24.6 across affected packages: anki.
What version fixes CVE-2024-32152?
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-32152?
CVE-2024-32152 has a CVSS v3.1 base score of 3.1 (LOW) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2024-32152?
CVE-2024-32152 is classified under CWE-184: Incomplete List of Disallowed Inputs (The product implements a protection mechanism that relies on a list of inputs (or properties of inputs) that are not allowed by policy or otherwise require other action to neutralize before additional processing takes place, but the list is incomplete.).
How can I check PyPI dependencies for CVE-2024-32152?
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-q47p-v5rw-v574",
  "modified" : "2024-07-26T16:13:25Z",
  "published" : "2024-07-22T15:32:41Z",
  "aliases" : [ "CVE-2024-32152" ],
  "summary" : "Ankitects Anki LaTeX Blocklist Bypass vulnerability",
  "details" : "A blocklist bypass vulnerability exists in the LaTeX functionality of Ankitects Anki 24.04. A specially crafted malicious flashcard can lead to an arbitrary file creation at a fixed path. An attacker can share a malicious flashcard to trigger this vulnerability.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:P/VC:N/VI:L/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-32152"
  }, {
    "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-1994"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-184" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-07-25T14:44:26Z",
    "nvd_published_at" : "2024-07-22T15:15:03Z"
  }
}