{
  "affected": [
    {
      "ecosystem_specific": {},
      "package": {
        "ecosystem": "Alpine:v3.14",
        "name": "py3-sqlparse",
        "purl": "pkg:apk/alpine/py3-sqlparse?arch=source"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0.4.2-r0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "ecosystem_specific": {},
      "package": {
        "ecosystem": "Alpine:v3.15",
        "name": "py3-sqlparse",
        "purl": "pkg:apk/alpine/py3-sqlparse?arch=source"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0.4.2-r0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "ecosystem_specific": {},
      "package": {
        "ecosystem": "Alpine:v3.16",
        "name": "py3-sqlparse",
        "purl": "pkg:apk/alpine/py3-sqlparse?arch=source"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0.4.2-r0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "ecosystem_specific": {},
      "package": {
        "ecosystem": "Alpine:v3.17",
        "name": "py3-sqlparse",
        "purl": "pkg:apk/alpine/py3-sqlparse?arch=source"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0.4.2-r0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "ecosystem_specific": {},
      "package": {
        "ecosystem": "Alpine:v3.18",
        "name": "py3-sqlparse",
        "purl": "pkg:apk/alpine/py3-sqlparse?arch=source"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0.4.2-r0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "ecosystem_specific": {},
      "package": {
        "ecosystem": "Alpine:v3.19",
        "name": "py3-sqlparse",
        "purl": "pkg:apk/alpine/py3-sqlparse?arch=source"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0.4.2-r0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "ecosystem_specific": {},
      "package": {
        "ecosystem": "Alpine:v3.20",
        "name": "py3-sqlparse",
        "purl": "pkg:apk/alpine/py3-sqlparse?arch=source"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0.4.2-r0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "ecosystem_specific": {},
      "package": {
        "ecosystem": "Alpine:v3.21",
        "name": "py3-sqlparse",
        "purl": "pkg:apk/alpine/py3-sqlparse?arch=source"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0.4.2-r0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "ecosystem_specific": {},
      "package": {
        "ecosystem": "Alpine:v3.22",
        "name": "py3-sqlparse",
        "purl": "pkg:apk/alpine/py3-sqlparse?arch=source"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0.4.2-r0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "ecosystem_specific": {},
      "package": {
        "ecosystem": "Alpine:v3.23",
        "name": "py3-sqlparse",
        "purl": "pkg:apk/alpine/py3-sqlparse?arch=source"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0.4.2-r0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "ecosystem_specific": {},
      "package": {
        "ecosystem": "Alpine:v3.24",
        "name": "py3-sqlparse",
        "purl": "pkg:apk/alpine/py3-sqlparse?arch=source"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0.4.2-r0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "details": "sqlparse is a non-validating SQL parser module for Python. In sqlparse versions 0.4.0 and 0.4.1 there is a regular Expression Denial of Service in sqlparse vulnerability. The regular expression may cause exponential backtracking on strings containing many repetitions of '\\r\\n' in SQL comments. Only the formatting feature that removes comments from SQL statements is affected by this regular expression. As a workaround don't use the sqlformat.format function with keyword strip_comments=True or the --strip-comments command line flag when using the sqlformat command line tool. The issues has been fixed in sqlparse 0.4.2.",
  "id": "ALPINE-CVE-2021-32839",
  "modified": "2026-11-03T06:17:58.437326295Z",
  "published": "2021-09-20T17:15:09.067Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://security.alpinelinux.org/vuln/CVE-2021-32839"
    }
  ],
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    }
  ],
  "upstream": [
    "CVE-2021-32839"
  ]
}