CVE-2025-13120 mruby array.c sort_cmp use after free
A use-after-free vulnerability in mruby's sort_cmp function allows local attackers to potentially execute code or cause denial of service.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-13120?
CVE-2025-13120 is a medium-severity use after free vulnerability in mruby, published on 13 Nov 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
A vulnerability has been found in mruby up to 3.4.0. This vulnerability affects the function sort_cmp of the file src/array.c. Such manipulation leads to use after free. An attack has to be approached locally. The exploit has been disclosed to the public and may be used. The name of the patch is eb398971bfb43c38db3e04528b68ac9a7ce509bc. It is advisable to implement a patch to correct this issue.
Which versions are affected by CVE-2025-13120?
It affects 1 product.
Products include Mruby Mruby.
How do I fix CVE-2025-13120?
Apply the vendor's patch.
Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.
Is CVE-2025-13120 being exploited?
There is no known exploitation of CVE-2025-13120 in the wild and no public exploit code.
Other vulnerabilities in mruby
Sources
Also known as DEBIAN-CVE-2025-13120, GHSA-j383-q79v-268x, UBUNTU-CVE-2025-13120.