Intel

AIKIDO-2025-10418

Kanna is vulnerable to Use-After-Free

Use-After-Free Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Jun 27, 2025

71

High Risk

This Affects:

SwiftKanna
4.0.0 - 6.0.0
Fixed in 6.0.1
Are you affected? Scan for Free

TL;DR

Affected versions of this package are vulnerable to memory corruption due to a use-after-free error stemming from the unsafe conversion of Swift strings to temporary C buffers during XML parsing. By passing temporary cString pointers to xmlReadDoc(), heap memory can be deallocated before finishing parsing. An attacker could exploit this issue by sending multiple large XML/HTML payloads, causing crashes, or through targeted memory grooming to leak sensitive data, like authentication tokens from freed memory.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Background info

Kanna is vulnerable to Use-After-Free in versions 4.0.0 - 6.0.0.

How to fix this

Upgrade the Kanna library to the patch version.