Interpreter crash via stale Array shift state
Published Dec 30, 2021 · Updated Aug 3, 2024
Null pointer dereference in mruby before 3.1 allows local users to crash the interpreter through a crafted Array#shift argument. mrb_ary_shift_m caches the receiver's array pointer and length before mrb_get_args permits integer coercion to modify that array, leaving stale state for later operations. Exploitation requires the ability to execute Ruby code in the affected interpreter and can terminate its hosting process.
Summary
What happened
Null pointer dereference in mruby before 3.1 allows local users to crash the interpreter through a crafted Array#shift argument. mrb_ary_shift_m caches the receiver's array pointer and length before mrb_get_args permits integer coercion to modify that array, leaving stale state for later operations. Exploitation requires the ability to execute Ruby code in the affected interpreter and can terminate its hosting process.
The record
- CVE
- CVE-2021-4188
- Published
- Dec 30, 2021
- Updated
- Aug 3, 2024
- Vendor
- mruby
- Product
- mruby
- Classifications
- CWE-476, T1499.004
- Attack vector
- local
- Privileges
- unauthenticated
Timeline
How it unfolded
- Dec 30, 2021CVE publishedPublication date reported by the CVE source.
- Aug 3, 2024Record 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
- Huntr proof of concept for CVE-2021-4188proof of concept · unverified
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