Skip to content
Heist/ feed
Back to feed
CriticalFix available

glibc — security advisory

Type: advisorySources: OSVAdvisory ID: DEBIAN-CVE-2021-35942

The wordexp function in the GNU C Library (aka glibc) through 2.33 may crash or read arbitrary memory in parse_param (in posix/wordexp.c) when called with an untrusted, crafted pattern, potentially resulting in a denial of service or disclosure of information. This occurs because atoi was used but strtoul should have been used to ensure correct calculations.

Products
glibc
Affected versions
Not specified
Fixed versions
2.31-13
CVEs
CVE-2021-35942
Confirmed fixed CVEs
Not specified
Updated in this feed
30 Oct 2026, 16:37 UTC · Revision 1

Source evidence

DEBIAN-CVE-2021-35942

core-osv · Original source

Published 22 Jul 2021, 18:15 UTC

The wordexp function in the GNU C Library (aka glibc) through 2.33 may crash or read arbitrary memory in parse_param (in posix/wordexp.c) when called with an untrusted, crafted pattern, potentially resulting in a denial of service or disclosure of information. This occurs because atoi was used but strtoul should have been used to ensure correct calculations.

osv:DEBIAN-CVE-2021-35942

glibc

Fixed versions: 2.31-13

glibc

Fixed versions: 2.31-13

glibc

Fixed versions: 2.31-13

Complete source record
{
  "id": "3e5a9b6bf568fc5f89aefaa97b6ec4644334e5c1ec954875eb3650e12a7a4d91",
  "url": "https://osv.dev/vulnerability/DEBIAN-CVE-2021-35942",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "DEBIAN-CVE-2021-35942",
    "summary": "The wordexp function in the GNU C Library (aka glibc) through 2.33 may crash or read arbitrary memory in parse_param (in posix/wordexp.c) when called with an untrusted, crafted pattern, potentially resulting in a denial of service or disclosure of information. This occurs because atoi was used but strtoul should have been used to ensure correct calculations.",
    "evidence": "osv:DEBIAN-CVE-2021-35942",
    "products": [
      {
        "name": {
          "value": "glibc",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "2.31-13",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "glibc",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "2.31-13",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "glibc",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "2.31-13",
            "evidence": "/affected/2/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "critical",
    "structured": {
      "id": "DEBIAN-CVE-2021-35942",
      "aliases": [
        "DEBIAN-CVE-2021-35942"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "2.31-13"
                }
              ]
            }
          ],
          "package": {
            "name": "glibc",
            "purl": "pkg:deb/debian/glibc?arch=source&distro=bookworm",
            "ecosystem": "Debian:12"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2021-35942.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "2.31-13"
                }
              ]
            }
          ],
          "package": {
            "name": "glibc",
            "purl": "pkg:deb/debian/glibc?arch=source&distro=trixie",
            "ecosystem": "Debian:13"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2021-35942.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "2.31-13"
                }
              ]
            }
          ],
          "package": {
            "name": "glibc",
            "purl": "pkg:deb/debian/glibc?arch=source&distro=forky",
            "ecosystem": "Debian:14"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2021-35942.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        }
      ],
      "modified": "2026-10-15T09:47:35.494768394Z",
      "provider": "osv",
      "upstream": [
        "CVE-2021-35942"
      ],
      "references": [
        "https://security-tracker.debian.org/tracker/CVE-2021-35942"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2021-35942",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 327804,
  "published_at": "2021-07-22T18:15:23.287+00:00"
}