CVE-2025-7207 mruby nregs codegen.c scope_new heap-based overflow

Medium 4.8 Published Updated

A heap-based buffer overflow in mruby's compiler allows local attackers to execute arbitrary 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-7207?

CVE-2025-7207 is a medium-severity memory corruption vulnerability in mruby, published on 9 Jul 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

A vulnerability, which was classified as problematic, was found in mruby up to 3.4.0-rc2. Affected is the function scope_new of the file mrbgems/mruby-compiler/core/codegen.c of the component nregs Handler. The manipulation leads to heap-based buffer overflow. 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 1fdd96104180cc0fb5d3cb086b05ab6458911bb9. It is recommended to apply a patch to fix this issue.

Weakness: CWE-122, CWE-787, CWE-119

Which versions are affected by CVE-2025-7207?

It affects 1 product.

Products include Mruby Mruby.

How do I fix CVE-2025-7207?

Apply the vendor's patch.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2025-7207 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-7207 exists.

Sources

Also known as DEBIAN-CVE-2025-7207, GHSA-48pr-6hvf-39v3, UBUNTU-CVE-2025-7207.

Is CVE-2025-7207 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free