# CVE-2025-13120: mruby array.c sort_cmp use after free

- Severity: Medium 4.8 (CVSS:4.0, scored by VulDB) `CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.16%, higher than 5% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2025-11-13T15:32:07.825Z
- Modified: 2026-10-19T13:10:00.110Z
- Weaknesses: CWE-119, CWE-416
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: VulDB

## 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.

(As written by CVE List.)

## Affected

- mruby: 3.0; 3.1; 3.2; 3.3; 3.4.0
- mruby mruby: up to 3.4.0

## Every score

- VulDB: CVSS:4.0 4.8 Medium `CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P`
- VulDB: CVSS:3.1 5.3 Medium `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`
- VulDB: CVSS:3.0 5.3 Medium `CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L/E:P/RL:O/RC:C`
- VulDB: CVSS:2.0 4.3 Medium `AV:L/AC:L/Au:S/C:P/I:P/A:P/E:POC/RL:OF/RC:C`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://github.com/mruby/mruby/issues/6649#issue-3534393003> (exploit, issue-tracking, vendor-advisory)
- <https://vuldb.com/?id.332325> (technical-description, third-party-advisory, vdb-entry)
- <https://vuldb.com/?ctiid.332325> (permissions-required, signature, vdb-entry)
- <https://vuldb.com/?submit.683435> (third-party-advisory, vdb-entry)
- <https://github.com/mruby/mruby/issues/6649> (issue-tracking, vendor-advisory)
- <https://github.com/makesoftwaresafe/mruby/pull/263> (issue-tracking)
- <https://github.com/mruby/mruby/commit/eb398971bfb43c38db3e04528b68ac9a7ce509bc> (patch)
- <https://github.com/mruby/mruby/> (product)

## Sources

- CVE List: [CVE-2025-13120](https://www.cve.org/CVERecord?id=CVE-2025-13120), CVE Terms of Use, modified 2026-03-04
- NVD: [CVE-2025-13120](https://nvd.nist.gov/vuln/detail/CVE-2025-13120), Public domain, modified 2026-10-19

---

Page: https://cve.day/CVE-2025-13120 · Whole record: https://cve.day/CVE-2025-13120.json · Rebuilt by cve.day 2026-11-25T22:59:07.629Z
