CVE-2022-4891: Sisimai Sisimai Inefficient Regular Expression Complexity Vulnerability

MODERATE
Advisory Identifier: GHSA-vm74-j4wq-82xj
CVSS 4.3
CWE-1333
Published
Advisory Summary

CVE-2022-4891 is a MODERATE (CVSS 4.3) sisimai inefficient regular expression complexity vulnerability (CWE-1333: Inefficient Regular Expression Complexity) affecting Sisimai libraries in the RubyGems ecosystem. The issue involves sisimai inefficient regular expression complexity vulnerability. Remediation is available by upgrading affected packages to version 4.25.14p12.

CVE-2022-4891 at a Glance

CVE Identifier CVE-2022-4891
GHSA Identifier GHSA-vm74-j4wq-82xj
Severity MODERATE
CVSS v3.1 Base Score 4.3
CWE Classification CWE-1333: Inefficient Regular Expression Complexity
Affected Product Sisimai
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 4.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability Low (A:L)

How to Fix CVE-2022-4891

To remediate this vulnerability, upgrade all affected Sisimai dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

sisimai fixed: 4.25.14p12
Upgrade sisimai to 4.25.14p12
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for sisimai

How to Check if You Are Affected

To determine whether your application is affected by CVE-2022-4891, inspect your project dependencies for Sisimai:

inspect dependencies for sisimai

Analyze the terminal output to locate any version of Sisimai in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.25.14p12), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-1333: Inefficient Regular Expression Complexity, where the product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential. In Sisimai, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

A vulnerability has been found in Sisimai up to 4.25.14p11 and classified as problematic. This vulnerability affects the function `to_plain` of the file `lib/sisimai/string.rb`. The manipulation leads to inefficient regular expression complexity. The exploit has been disclosed to the public and may be used. Upgrading to version 4.25.14p12 is able to address this issue. The name of the patch is 51fe2e6521c9c02b421b383943dc9e4bbbe65d4e. It is recommended to upgrade the affected component. The identifier of this vulnerability is VDB-218452.

CVE-2022-4891 Affected Sisimai Versions

1 component(s)
Fixed Versions:
4.25.14p12
Product / Package Ecosystem Affected Versions Fixed Version
sisimai
RubyGems
< 4.25.14p12
4.25.14p12

References

Frequently Asked Questions

What is CVE-2022-4891?
CVE-2022-4891 is a security vulnerability in Sisimai involving Sisimai Inefficient Regular Expression Complexity vulnerability under CWE-1333: Inefficient Regular Expression Complexity.
Which Sisimai versions are affected?
Affected versions include releases prior to 4.25.14p12 across affected packages: sisimai.
What version fixes CVE-2022-4891?
Upgrading to 4.25.14p12 (or the latest patched release for your respective branch) resolves the vulnerability.
Is sisimai affected?
Yes, sisimai is affected in releases prior to 4.25.14p12. Upgrade your dependency to 4.25.14p12 or later.
What is the CVSS score of CVE-2022-4891?
CVE-2022-4891 has a CVSS v3.1 base score of 4.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L.
What CWE is associated with CVE-2022-4891?
CVE-2022-4891 is classified under CWE-1333: Inefficient Regular Expression Complexity (The product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential.).
How can I check RubyGems dependencies for CVE-2022-4891?
Run the dependency tree command: 'inspect dependencies for sisimai'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-vm74-j4wq-82xj",
  "modified" : "2026-02-17T22:04:50Z",
  "published" : "2023-01-17T21:30:22Z",
  "aliases" : [ "CVE-2022-4891" ],
  "summary" : "Sisimai Inefficient Regular Expression Complexity vulnerability",
  "details" : "A vulnerability has been found in Sisimai up to 4.25.14p11 and classified as problematic. This vulnerability affects the function `to_plain` of the file `lib/sisimai/string.rb`. The manipulation leads to inefficient regular expression complexity. The exploit has been disclosed to the public and may be used. Upgrading to version 4.25.14p12 is able to address this issue. The name of the patch is 51fe2e6521c9c02b421b383943dc9e4bbbe65d4e. It is recommended to upgrade the affected component. The identifier of this vulnerability is VDB-218452.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "sisimai"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.25.14p12"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-4891"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sisimai/rb-sisimai/pull/244"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sisimai/rb-sisimai/commit/51fe2e6521c9c02b421b383943dc9e4bbbe65d4e"
  }, {
    "type" : "WEB",
    "url" : "https://gist.githubusercontent.com/gmcabrita/e5dc0332473fc2e3a7a407434c8d21c7/raw/00b12035e5e1b685469f143b94301a50306376ba/example.html"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/sisimai/CVE-2022-4891.yml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/sisimai/rb-sisimai"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sisimai/rb-sisimai/releases/tag/v4.25.14p12"
  }, {
    "type" : "WEB",
    "url" : "https://vuldb.com/?ctiid.218452"
  }, {
    "type" : "WEB",
    "url" : "https://vuldb.com/?id.218452"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1333" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-01-20T23:19:16Z",
    "nvd_published_at" : "2023-01-17T20:15:00Z"
  }
}