Vulnerability · Published Nov 13, 2025 · Assigned by VulDB
CVE-2025-13120mruby array.c sort_cmp use after free
Medium 5.3
In plain English
A medium-severity use-after-free in mruby. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 5% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | mruby | no fix listed | DEBIAN-CVE-2025-13120 |
| Debian:13 | mruby | no fix listed | DEBIAN-CVE-2025-13120 |
| Debian:14 | mruby | 4.0.0-1 | DEBIAN-CVE-2025-13120 |
| Ubuntu:22.04:LTS | mruby | no fix listed | UBUNTU-CVE-2025-13120 |
| Ubuntu:24.04:LTS | mruby | no fix listed | UBUNTU-CVE-2025-13120 |
| Ubuntu:25.10 | mruby | no fix listed | UBUNTU-CVE-2025-13120 |
| Ubuntu:26.04:LTS | mruby | no fix listed | UBUNTU-CVE-2025-13120 |
| Ubuntu:26.10 | mruby | no fix listed | UBUNTU-CVE-2025-13120 |
Affected products (as reported)
Weakness: CWE-416, CWE-119 · Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L/E:P/RL:O/RC:C
References
- VDB-332325 | mruby array.c sort_cmp use after free vdb-entry, technical-description
- VDB-332325 | CTI Indicators (IOB, IOC, IOA) signature, permissions-required
- Submit #683435 | mruby 3.4.0 Use After Free third-party-advisory
- https://github.com/mruby/mruby/issues/6649 issue-tracking
- https://github.com/makesoftwaresafe/mruby/pull/263 issue-tracking
- https://github.com/mruby/mruby/issues/6649#issue-3534393003 exploit, issue-tracking
- https://github.com/mruby/mruby/commit/eb398971bfb43c38db3e04528b68ac9a7ce509bc patch
- https://github.com/mruby/mruby/ product