Technical impact
Ladybird’s FinalizationRegistry::cleanup() function performs a use-after-free by retaining an iterator to a registry record, freeing the node via an attacker-controlled callback, and then accessing the freed memory. This results in a reliable crash and presents a memory-corruption primitive that could be leveraged for arbitrary code execution if an attacker can control the cleanup callback. The weakness is a classic heap-based use-after-free (CWE-416).
Affected Systems
The vulnerability affects Ladybird Browser and any builds that include the pre-commit version of FinalizationRegistry.cpp exposed in commit 209579c96473c75bd5eba9701fcadb841a045964. Since the affected revision range is not explicitly versioned, any release built before that commit is vulnerable.
Risk and Exploitability
With a CVSS score of 8.8 the vulnerability is of high severity. The EPSS score is not available, and it is not listed in the CISA KEV catalog. The likely attack vector is a malicious web page that runs JavaScript in the user’s browser context; the attacker needs to be able to trigger FinalizationRegistry::cleanup() and supply a cleanup callback that calls unregister(). Thus the risk is significant for users browsing untrusted content, with the potential to crash the browser or lead to remote code execution if the memory corruption is exploited.