Intel

AIKIDO-2025-10425

sonic-rs is vulnerable to Use After Free

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

72

High Risk

This Affects:

RUSTsonic-rs
0.3.0 - 0.5.1
Fixed in 0.5.2
Are you affected? Scan for Free

TL;DR

Affected versions of this package have a Use-After-Free vulnerability in the into_object_iter function. If the ObjectJsonIter is dropped prematurely, borrowed keys become dangling pointers to freed memory. Accessing these keys can result in undefined behavior, including segmentation faults or data leaks. An attacker can exploit this by using crafted JSON input to retain keys after the iterator is destroyed, potentially causing crashes or enabling remote code execution.

Who does this affect?

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

Background info

sonic-rs is vulnerable to Use After Free in versions 0.3.0 - 0.5.1.

How to fix this

Upgrade the sonic-rs library to the patch version.