Vulnerability · Published Jul 9, 2025 · Assigned by VulDB
CVE-2025-7207mruby nregs codegen.c scope_new heap-based overflow
Low 3.3
In plain English
A low-severity heap buffer overflow in mruby. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 18% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | mruby | no fix listed | DEBIAN-CVE-2025-7207 |
| Debian:13 | mruby | no fix listed | DEBIAN-CVE-2025-7207 |
| Debian:14 | mruby | 3.4.0-2 | DEBIAN-CVE-2025-7207 |
| Ubuntu:22.04:LTS | mruby | no fix listed | UBUNTU-CVE-2025-7207 |
| Ubuntu:24.04:LTS | mruby | no fix listed | UBUNTU-CVE-2025-7207 |
| Ubuntu:25.10 | mruby | no fix listed | UBUNTU-CVE-2025-7207 |
| Ubuntu:26.04:LTS | mruby | no fix listed | UBUNTU-CVE-2025-7207 |
| Ubuntu:26.10 | mruby | no fix listed | UBUNTU-CVE-2025-7207 |
Affected products (as reported)
Weakness: CWE-122, CWE-119 · Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L/E:P/RL:O/RC:C
References
- VDB-315156 | mruby nregs codegen.c scope_new heap-based overflow vdb-entry, technical-description
- VDB-315156 | CTI Indicators (IOB, IOC, IOA) signature, permissions-required
- Submit #607683 | mruby mruby 3.4.0-rc2 (commit dd68681) Heap-based Buffer Overflow third-party-advisory
- https://github.com/mruby/mruby/issues/6509 issue-tracking
- https://github.com/mruby/mruby/issues/6509#event-17145516649 issue-tracking
- https://github.com/user-attachments/files/19619499/mruby_crash.txt exploit
- https://github.com/mruby/mruby/commit/1fdd96104180cc0fb5d3cb086b05ab6458911bb9 patch