ClamAV Critical Patch Review
ClamAV had two vulnerabilities: an XXE in DMG property list parsing and a heap buffer overflow in HFS+ catalog parsing. An attacker could read local files if debug logging was enabled, and potentially achieve code execution with further work.
ClamAV released a critical patch a few days ago with fixes for two vulnerabilities reported by Simon Scannell:
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 write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The XXE was caused by enabling XML entity substitution (XML_PARSE_NOENT) in libxml2, and the heap overflow was caused by missing a size check before copying data into a fixed-size buffer.
Impact
The XXE could leak local files only when debug logging is enabled; the heap overflow could potentially lead to code execution but requires further exploitation steps such as an information leak.
What the attacker needed
ClamAV version 1.0.0; Debug logging enabled for XXE file leak; Crafted DMG or HFS+ file
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 write-up has not been written yet. The Original tab links to the source.
ClamAV is antivirus software that scans files. One bug let a malicious file make the scanner read local files when debug logging was on. Another bug could crash the scanner or possibly let an attacker run code, but that would need more research.
What is XXE?
An XML parser resolves entities the attacker defines, reading local files or making the server send requests.