Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2025-13120: Use After Free in mruby

0
Medium
VulnerabilityCVE-2025-13120cvecve-2025-13120
Published: Thu Nov 13 2025 (11/13/2025, 15:32:07 UTC)
Source: CVE Database V5
Product: mruby

Description

CVE-2025-13120 is a use-after-free vulnerability in the mruby interpreter affecting versions up to 3. 4. 0, specifically in the sort_cmp function within src/array. c. Exploitation requires local access and low privileges, with no user interaction needed. The vulnerability can lead to memory corruption, potentially causing crashes or arbitrary code execution. Although the CVSS score is medium (4. 8), the impact on confidentiality, integrity, and availability is limited by the need for local access and the absence of remote exploitation vectors. A patch identified by commit eb398971bfb43c38db3e04528b68ac9a7ce509bc is available and should be applied promptly. European organizations using mruby in development or embedded systems should assess exposure and update affected versions.

AI-Powered Analysis

AILast updated: 11/20/2025, 16:19:31 UTC

Technical Analysis

CVE-2025-13120 is a use-after-free vulnerability discovered in the mruby interpreter, a lightweight Ruby implementation used primarily in embedded systems and applications requiring a small footprint. The flaw exists in the sort_cmp function located in src/array.c, where improper memory management leads to use-after-free conditions. This vulnerability arises when the function manipulates array elements during sorting, freeing memory that is subsequently accessed, resulting in undefined behavior. Exploitation requires local access with low privileges and does not require user interaction, which means an attacker with limited system access can trigger the flaw. The vulnerability can cause memory corruption, leading to application crashes or potentially arbitrary code execution if exploited skillfully. The vulnerability affects mruby versions 3.0 through 3.4.0. A patch has been released (commit eb398971bfb43c38db3e04528b68ac9a7ce509bc) to correct the issue. The CVSS 4.0 vector assigns a score of 4.8 (medium severity), reflecting the local attack vector, low complexity, no user interaction, and limited scope. No known exploits are currently observed in the wild, but public disclosure increases the risk of exploitation attempts. Organizations using mruby in development environments, embedded devices, or custom applications should prioritize patching to mitigate potential risks.

Potential Impact

For European organizations, the impact of CVE-2025-13120 depends largely on the extent of mruby usage within their environments. Since mruby is often embedded in IoT devices, industrial control systems, or used in lightweight scripting contexts, exploitation could lead to denial of service or unauthorized code execution on affected devices. This could disrupt operations, especially in sectors like manufacturing, telecommunications, and critical infrastructure where embedded Ruby interpreters are integrated. Confidentiality risks are moderate, as local access is required, but integrity and availability could be compromised if attackers leverage the vulnerability to execute arbitrary code or cause system crashes. The medium CVSS score reflects these constraints. European organizations with development teams using mruby for testing or internal tools may also face risks if attackers gain local access to developer machines. Overall, the threat is significant for environments where mruby is deployed on devices or systems with sensitive operational roles or limited physical security.

Mitigation Recommendations

1. Immediately apply the official patch identified by commit eb398971bfb43c38db3e04528b68ac9a7ce509bc to all affected mruby versions (3.0 through 3.4.0). 2. Conduct an inventory of all systems and devices running mruby to identify exposure, including embedded devices and development environments. 3. Restrict local access to systems running mruby to trusted users only, employing strong authentication and access controls to reduce the risk of local exploitation. 4. Implement monitoring for unusual process crashes or memory corruption symptoms that could indicate exploitation attempts. 5. For embedded devices, ensure secure firmware update mechanisms are in place to deploy patches efficiently. 6. Educate developers and system administrators about the vulnerability and the importance of applying updates promptly. 7. Where possible, isolate systems running mruby from critical networks to limit potential lateral movement in case of compromise. 8. Review and harden system configurations to minimize privilege levels and reduce the attack surface around mruby usage.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.2
Assigner Short Name
VulDB
Date Reserved
2025-11-13T09:07:33.572Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 6915fe5477eaf5a84960393e

Added to database: 11/13/2025, 3:50:44 PM

Last enriched: 11/20/2025, 4:19:31 PM

Last updated: 11/22/2025, 3:17:32 PM

Views: 14

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats