Skip to content
Heist/ feed
Back to feed
Medium

Regular Expression Denial of Service (ReDoS)

Type: advisorySources: OSV

The package terser before 4.8.1, from 5.0.0 and before 5.14.2 are vulnerable to Regular Expression Denial of Service (ReDoS) due to insecure usage of regular expressions.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2022-25858
Confirmed fixed CVEs
Not specified
Updated in this feed
2 Nov 2026, 23:31 UTC · Revision 1

Source evidence

Regular Expression Denial of Service (ReDoS)

core-osv · Original source

Published 15 Jul 2022, 20:00 UTC

The package terser before 4.8.1, from 5.0.0 and before 5.14.2 are vulnerable to Regular Expression Denial of Service (ReDoS) due to insecure usage of regular expressions.

osv:CVE-2022-25858
Complete source record
{
  "id": "91a6ab04f5329236bb7b065f8dc8c759e025630f115107f9acfb762f3464a716",
  "url": "https://osv.dev/vulnerability/CVE-2022-25858",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Regular Expression Denial of Service (ReDoS)",
    "summary": "The package terser before 4.8.1, from 5.0.0 and before 5.14.2 are vulnerable to Regular Expression Denial of Service (ReDoS) due to insecure usage of regular expressions.",
    "evidence": "osv:CVE-2022-25858",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2022-25858",
      "aliases": [
        "CVE-2022-25858",
        "GHSA-4wf5-vphf-c2xc"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/terser/terser",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "40674a433e2b2fd9dfe7aaa93a0da224fb5e76b9"
                },
                {
                  "introduced": "aacd5770d9364ecaca80ff450fe329e021ac98aa"
                },
                {
                  "fixed": "c5cb19de2baafa1db60b1e8c387d9d995844f7ef"
                },
                {
                  "fixed": "a4da7349fdc92c05094f41d33d06d8cd4e90e76b"
                },
                {
                  "fixed": "d8cc5691be980d663c29cc4d5ce67e852d597012"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:terser:terser:*:*:*:*:*:node.js:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "4.8.1"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:terser:terser:*:*:*:*:*:node.js:*:*",
                    "range": [
                      {
                        "introduced": "5.0.0"
                      },
                      {
                        "fixed": "5.14.2"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "a4da7349fdc92c05094f41d33d06d8cd4e90e76b"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "d8cc5691be980d663c29cc4d5ce67e852d597012"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v5.14.1",
            "v5.14.0",
            "v5.13.1",
            "v4.8.0",
            "v5.13.0",
            "v5.12.1",
            "v5.12.0",
            "v5.11.0",
            "v5.10.0",
            "v5.9.0",
            "v5.8.0",
            "v5.7.2",
            "v5.7.1",
            "v5.7.0",
            "v5.6.1",
            "v5.6.0",
            "v5.5.1",
            "v5.5.0",
            "v5.4.0",
            "v5.3.8",
            "v5.3.7",
            "v5.3.6",
            "v5.3.5",
            "v5.3.4",
            "v5.3.3",
            "v5.3.2",
            "v5.3.1",
            "v5.3.0",
            "v5.2.1",
            "v5.2.0",
            "v5.1.0",
            "v5.0.0",
            "v4.7.0",
            "v4.6.13",
            "v4.6.12",
            "v4.6.11",
            "v4.6.10",
            "v4.6.9",
            "v4.6.8",
            "v4.6.6",
            "v4.6.5",
            "v4.6.4",
            "v4.6.3",
            "v4.6.2",
            "v4.6.1",
            "v4.6.0",
            "v4.5.0",
            "v4.4.3",
            "v4.4.2",
            "v4.4.1",
            "v4.4.0",
            "v4.3.11",
            "v4.3.10",
            "v4.3.9",
            "v4.3.8",
            "v4.3.7",
            "v4.3.6",
            "v4.3.4",
            "v4.3.3",
            "v4.3.2",
            "v4.3.1",
            "v4.3.0",
            "v4.2.1",
            "v4.1.3",
            "v4.1.2",
            "v4.1.0",
            "v4.0.2",
            "v4.0.1",
            "v4.0.0",
            "v3.17.0",
            "v3.16.1",
            "v3.16.0",
            "v3.14.1",
            "v3.14.0",
            "v3.13.1",
            "v3.13.0",
            "v3.12.0",
            "v3.11.0",
            "v3.10.13",
            "v3.10.12",
            "v3.10.11",
            "3.10.11",
            "v3.10.10",
            "v3.10.8",
            "v3.10.7",
            "v3.10.6",
            "v3.10.5",
            "v3.10.4",
            "v3.10.3",
            "v3.10.2",
            "v3.10.1",
            "v3.10.0",
            "v3.9.3",
            "v3.9.2",
            "v3.9.1",
            "v3.8.2",
            "v3.8.1",
            "v3.8.0",
            "v3.7.8",
            "v3.7.7",
            "harmony-v3.3.10",
            "harmony-v3.3.9",
            "harmony-v3.3.8",
            "harmony-v3.3.7",
            "harmony-v3.3.6",
            "harmony-v3.3.5",
            "harmony-v3.3.4",
            "harmony-v3.3.3",
            "harmony-v3.3.2",
            "harmony-v3.3.1",
            "harmony-v3.3.0",
            "harmony-v3.2.2",
            "harmony-v3.2.1",
            "harmony-v3.2.0",
            "harmony-v3.1.10",
            "harmony-v3.1.9",
            "harmony-v3.1.8",
            "harmony-v3.1.7",
            "harmony-v3.1.6",
            "harmony-v3.1.5",
            "harmony-v3.1.4",
            "harmony-v3.1.3",
            "harmony-v3.1.2",
            "harmony-v3.1.1",
            "harmony-v3.1.0",
            "harmony-v3.0.28",
            "harmony-v3.0.27",
            "harmony-v3.0.26",
            "harmony-v3.0.25",
            "harmony-v3.0.24",
            "harmony-v3.0.23",
            "harmony-v3.0.22",
            "harmony-v3.0.21",
            "harmony-v3.0.20",
            "harmony-v3.0.19",
            "harmony-v3.0.18",
            "harmony-v3.0.17",
            "harmony-v3.0.15",
            "harmony-v3.0.14",
            "harmony-v3.0.13",
            "harmony-v3.0.12",
            "harmony-v3.0.11",
            "harmony-v3.0.10",
            "harmony-v3.0.9",
            "harmony-v3.0.8",
            "harmony-v3.0.7",
            "harmony-v3.0.6",
            "harmony-v3.0.5",
            "harmony-v3.0.4",
            "harmony-v3.0.3",
            "harmony-v3.0.2",
            "harmony-v3.0.1",
            "harmony-v3.0.0",
            "harmony-v2.8.22",
            "harmony-v2.8.21",
            "harmony-v2.8.19",
            "harmony-v2.8.17",
            "harmony-v2.8.15",
            "harmony-v2.8.14",
            "harmony-v2.8.13",
            "harmony-v2.8.12",
            "harmony-v2.8.11",
            "harmony-v2.8.7",
            "harmony-v2.8.5",
            "harmony-v2.8.4",
            "harmony-v2.8.2",
            "harmony-v2.8.0",
            "harmony-v2.7.5",
            "v2.4.24",
            "v2.4.23",
            "v2.4.22",
            "v2.4.21",
            "v2.4.20",
            "v2.4.19",
            "v2.4.18",
            "v2.4.16",
            "v2.4.15",
            "v2.4.14",
            "v2.4.13",
            "v2.4.12",
            "v2.4.11",
            "v2.4.10",
            "v2.4.9",
            "v2.4.8",
            "v2.4.7",
            "v2.4.6",
            "v2.4.5",
            "v2.4.4",
            "v2.4.3",
            "v2.4.2",
            "v2.4.1",
            "v2.4.0",
            "v2.3.6",
            "v2.3.5",
            "v2.3.4",
            "v2.3.3",
            "v2.3.2",
            "v2.3.1",
            "v2.3.0",
            "v2.3",
            "v2.2.5",
            "v2.2.4",
            "v2.2.3",
            "v2.2.2",
            "v2.2.1",
            "v2.2.0",
            "v2.1.11",
            "v2.1.10",
            "v2.1.9",
            "v2.1.8",
            "v2.1.7",
            "v2.1.6",
            "v2.1.5",
            "v2.1.4",
            "v2.1.3",
            "v2.1.2",
            "v2.1.1",
            "v2.1",
            "v2.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-25858.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:24.353029963Z",
      "provider": "osv",
      "references": [
        "https://github.com/terser/terser/blob/master/lib/compress/evaluate.js%23L135",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/25xxx/CVE-2022-25858.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2022-25858",
        "https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-2949722",
        "https://snyk.io/vuln/SNYK-JS-TERSER-2806366",
        "https://github.com/terser/terser/commit/a4da7349fdc92c05094f41d33d06d8cd4e90e76b",
        "https://github.com/terser/terser/commit/d8cc5691be980d663c29cc4d5ce67e852d597012"
      ],
      "provider_metadata": {
        "cna_assigner": "snyk",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/25xxx/CVE-2022-25858.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2022-25858",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 490906,
  "published_at": "2022-07-15T20:00:19.59+00:00"
}