Skip to content
Info disclosure Advisory Intermediate CVE-2024-29073

Ankitects Anki Latex Incomplete Blocklist Vulnerability

Anki's LaTeX blocklist failed to block the verbatim package, allowing a malicious flashcard to read arbitrary files and exfiltrate them via JavaScript. An attacker could share a crafted deck to trigger this.

Autumn Bee Skerritt Follow

Originally disclosed on Cisco Talos

Medium 5.3 View original

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.

Autumn Bee Skerritt, on Cisco Talos

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Impact

An attacker could read arbitrary files from the victim's system and exfiltrate them, but the attack requires user interaction (opening a shared deck).

What the attacker needed

Victim opens a shared deck; LaTeX handler installed (e.g., MiKTeX)

The fix

The vendor released a patch, likely by adding the verbatim package to the blocklist.

How it was found

  1. Craft a flashcard header that loads the verbatim package.
  2. Use the verbatiminput command in the card body to read a file or run system commands.
  3. Add JavaScript to the card template to extract the rendered LaTeX image source and send it to an attacker-controlled server.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

Anki is a flashcard app that can display LaTeX, a typesetting system. A security filter meant to stop dangerous LaTeX commands missed one package, so a shared flashcard could read files on your computer and send them to an attacker.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More by Autumn Bee Skerritt

View all

3 more disclosed reports, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.