# CVE-2022-1212: Use-After-Free in str_escape in mruby/mruby in mruby/mruby

- Severity: Critical 9.3 (CVSS:3.0, scored by @huntrdev) `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.79%, higher than 79% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2022-04-05T03:45:19.000Z
- Modified: 2026-06-17T04:22:01.420Z
- Weaknesses: CWE-416
- Assigned by: @huntrdev

## Description

Use-After-Free in str_escape in mruby/mruby in GitHub repository mruby/mruby prior to 3.2. Possible arbitrary code execution if being exploited.

(As written by CVE List.)

## Affected

- mruby mruby/mruby: from unspecified before 3.2
- mruby mruby: up to 3.0.0; 3.1.0

## Every score

- @huntrdev: CVSS:3.0 9.3 Critical `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:H`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 7.5 High `AV:N/AC:L/Au:N/C:P/I:P/A:P`

## References

- <https://huntr.dev/bounties/9fcc06d0-08e4-49c8-afda-2cae40946abe> (exploit, issue-tracking, patch, third-party-advisory)
- <https://github.com/mruby/mruby/commit/3cf291f72224715942beaf8553e42ba8891ab3c6> (patch, third-party-advisory)

## Sources

- CVE List: [CVE-2022-1212](https://www.cve.org/CVERecord?id=CVE-2022-1212), CVE Terms of Use, modified 2024-08-02
- NVD: [CVE-2022-1212](https://nvd.nist.gov/vuln/detail/CVE-2022-1212), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-1212 · Whole record: https://cve.day/CVE-2022-1212.json · Rebuilt by cve.day 2026-11-25T22:58:10.427Z
