macOS Monterey still vulnerable to CVE-2022-40303
macOS Monterey (and likely Big Sur) remained vulnerable to CVE-2022-40303, a libxml2 integer overflow, after Apple patched only macOS Ventura. An attacker could cause unexpected app termination or arbitrary code execution by supplying a crafted XML file.
lapcatsoftware.com
Published on lapcatsoftware.com
On November 9, Apple released macOS Ventura 13.0.1, as well as iOS 16.1.1 and iPadOS 16.1.1. The release notes list two security vulnerabilities fixed.
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
Likely an integer overflow in libxml2 when parsing XML attribute list declarations with extremely large names, leading to memory corruption.
Impact
A remote user could cause unexpected app termination or arbitrary code execution on unpatched macOS Monterey and likely Big Sur.
What the attacker needed
MacOS Monterey or Big Sur; ability to run xmllint or a vulnerable app; crafted XML file
How it was found
- Create a large XML file with a very long attribute name using a Python command.
- Run the xmllint tool on that file with the --huge option.
- Observe a segmentation fault and a crash report window.
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.
A library called libxml2, used by macOS to read XML files, had a bug where a very large number in a file could cause a crash or let an attacker run their own code. Apple fixed this in the newest macOS (Ventura) but not in the older Monterey, so Macs running Monterey were still at risk.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.