CVE-2022-4891: Sisimai Inefficient Regular Expression Complexity vulnerability
7.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.28457%
CWE
Published
1/17/2023
Updated
3/1/2024
KEV Status
No
Technology
Ruby
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| sisimai | rubygems | < 4.25.14p12 | 4.25.14p12 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from two regex patterns in the to_plain method:
%r|<head>.+</head>|im- Greedy.+between<head>tags causes excessive backtracking on malformed/nested content.%r|<style.+?>.+</style>|im- The outer.+?and inner.+create ambiguity in matching style tag boundaries. The patch replaced these with non-greedy quantifiers (.*?), confirming the root cause. The CWE-1333 classification and exploit example further validate the regex inefficiency in this specific function.