Skip to content
Heist/ feed
Back to feed
Unrated

Security advisory

Type: advisorySources: OSVCVE: CVE-2022-40896

A ReDoS issue was discovered in pygments/lexers/smithy.py in pygments through 2.15.0 via SmithyLexer.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2022-40896
Confirmed fixed CVEs
Not specified
Updated in this feed
7 Nov 2026, 19:24 UTC · Revision 1

Source evidence

CVE-2022-40896

core-osv · Original source

Published 19 Jul 2023, 00:00 UTC

A ReDoS issue was discovered in pygments/lexers/smithy.py in pygments through 2.15.0 via SmithyLexer.

osv:CVE-2022-40896
Complete source record
{
  "id": "2efb2c358eadc934173c4e45ac457000e2b3c6d173e48d4f437f2f14fa3b94c6",
  "url": "https://osv.dev/vulnerability/CVE-2022-40896",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2022-40896",
    "summary": "A ReDoS issue was discovered in pygments/lexers/smithy.py in pygments through 2.15.0 via SmithyLexer.",
    "evidence": "osv:CVE-2022-40896",
    "products": [],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2022-40896",
      "aliases": [
        "CVE-2022-40896",
        "GHSA-mrwq-x4v8-fh7p",
        "PYSEC-2023-117"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/pygments/pygments",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "last_affected": "6c187ad83267be9ce142af3fd5c9e670339dc7aa"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "last_affected": "2.15.0"
                      }
                    ],
                    "source": "DESCRIPTION"
                  },
                  {
                    "cpe": "cpe:2.3:a:pygments:pygments:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "last_affected": "2.15.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "2.15.0",
            "2.14.0",
            "2.13.0",
            "2.12.0",
            "2.11.2",
            "2.11.1",
            "2.11.0",
            "2.10.0",
            "2.9.0",
            "2.8.0",
            "2.7.4",
            "2.7.3",
            "2.7.2",
            "2.7.1",
            "2.7.0",
            "2.6.1",
            "2.6.0",
            "2.5.2",
            "2.5.1",
            "2.5.0",
            "2.4.2",
            "2.4.1",
            "2.1.1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-40896.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:51.822322880Z",
      "provider": "osv",
      "references": [
        "https://github.com/pygments/pygments/blob/master/pygments/lexers/smithy.py#L61",
        "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/EZGMXALE3HSP4OXC7UUWIKX3OXKZDTY3/",
        "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VUZO4BQCIY2S2KZYHERQMKURB7AHXDBO/",
        "https://pyup.io/posts/pyup-discovers-redos-vulnerabilities-in-top-python-packages-part-2/",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/40xxx/CVE-2022-40896.json",
        "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/EZGMXALE3HSP4OXC7UUWIKX3OXKZDTY3/",
        "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VUZO4BQCIY2S2KZYHERQMKURB7AHXDBO/",
        "https://nvd.nist.gov/vuln/detail/CVE-2022-40896",
        "https://pypi.org/project/Pygments/"
      ],
      "provider_metadata": {
        "cna_assigner": "mitre",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/40xxx/CVE-2022-40896.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2022-40896",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 520215,
  "published_at": "2023-07-19T00:00:00+00:00"
}