Skip to content
HighVulnerability

CVE-2024-12720: huggingface/transformers ReDoS in post_process_single()

Identifier
CVE-2024-12720
Published
Record updated
View JSON
Affected
  • transformers < 4.48.0
Fixed in
4.48.0
  • released January 10, 2025, 69 days before disclosure
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
0.7%

Summary

CVE-2024-12720 is a Regular Expression Denial of Service (ReDoS) flaw in the huggingface/transformers library, in tokenization_nougat_fast.py. A regex in the post_process_single() function processes specially crafted input, and exponential backtracking drives up CPU usage and can cause application downtime. The affected version is v4.46.3 (latest).

Mitigation

The source does not state a fix yet. Check the original advisory for updates.