Heap corruption via failed Proc copy
Published Jan 2, 2022 · Updated May 22, 2025
Heap-based buffer overflow in mruby before 3.1 allows attackers to corrupt heap memory by triggering a failed Proc copy. In mrb_proc_copy in src/proc.c, the vulnerable sequence copies a Proc's fields before incrementing the source irep reference, so a failed copy can leave a broken reference count and corrupt heap state. Reachability requires an embedding application to execute attacker-controlled Ruby code that exercises Proc copying; the public record does not establish impact beyond memory corruption.
Summary
What happened
Heap-based buffer overflow in mruby before 3.1 allows attackers to corrupt heap memory by triggering a failed Proc copy. In mrb_proc_copy in src/proc.c, the vulnerable sequence copies a Proc's fields before incrementing the source irep reference, so a failed copy can leave a broken reference count and corrupt heap state. Reachability requires an embedding application to execute attacker-controlled Ruby code that exercises Proc copying; the public record does not establish impact beyond memory corruption.
The record
- CVE
- CVE-2022-0080
- Published
- Jan 2, 2022
- Updated
- May 22, 2025
- Vendor
- mruby
- Product
- mruby
- Classifications
- CWE-122
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Jan 2, 2022CVE publishedPublication date reported by the CVE source.
- May 22, 2025Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=unspecified <3.1
What conditions does exploitation require?
What is affected?
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
No public exploit references are available in this record.
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo