CVE-2025-13120 Details
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.
A use-after-realloc vulnerability has been identified in mruby versions prior to 3.4.0, specifically within the Array sorting function 'sort_cmp' in 'src/array.c'. This vulnerability arises when the sorting process is interrupted by a user-defined comparator that modifies the array, such as by using 'slice!'. Such modifications can shrink or reallocate the array's storage, leading the sorting algorithm to dereference a stale pointer. This mismanagement allows invalid data to be processed, causing the program to crash or potentially execute arbitrary code.
Users are advised to update to mruby version 3.4.1 or later, where this vulnerability has been patched.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Nov 13, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/makesoftwaresafe/mruby/pull/263 | [email protected] | Issue Tracking |
| https://github.com/mruby/mruby/ | [email protected] | |
| https://github.com/mruby/mruby/commit/eb398971bfb43c38db3e04528b68ac9a7ce509bc | [email protected] | Patch |
| https://github.com/mruby/mruby/issues/6649 | [email protected] | Issue TrackingVendor Advisory |
| https://github.com/mruby/mruby/issues/6649#issue-3534393003 | [email protected] | Issue TrackingVendor Advisory |
| https://vuldb.com/?ctiid.332325 | [email protected] | Permissions RequiredVDB Entry |
| https://vuldb.com/?id.332325 | [email protected] | Third Party AdvisoryVDB Entry |
| https://vuldb.com/?submit.683435 | [email protected] | Third Party AdvisoryVDB Entry |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-119 | Improper Restriction of Operations within the Bounds of a Memory Buffer | [email protected] |
| CWE-416 | Use After Free | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| mruby mruby | <= 3.4.0 |
CPE
Remediation
| |
Change History
7 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 19, 2026 | CVE Translated | [email protected] |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Apr 29, 2026 | Data Remediation | [email protected] |
| Feb 24, 2026 | CVE Modified | [email protected] |
| Dec 4, 2025 | Initial Analysis | [email protected] |
| Nov 13, 2025 | New CVE Received | [email protected] |