CVE-2021-35942
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedThe 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.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceThe wordexp function in glibc through 2.33 contains an integer handling flaw in parse_param (posix/wordexp.c) where atoi was used instead of strtoul, leading to incorrect calculations that can cause the function to crash or read arbitrary memory when processing untrusted crafted patterns, potentially enabling denial of service or information disclosure.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.
NVD · CPE data= 10.0< 2.31all versions>= 11.0, <= 11.70.1all versionsall versionsall versionsCVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Privileges
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- None
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Identify installed glibc versionRun `ldd --version` or check `/lib/x86_64-linux-gnu/libc.so.6` for the version string. On Red Hat systems, check `rpm -q glibc`.Affected if The reported glibc version is less than 2.31
-
Check if wordexp is used by applicationsSearch application binaries and libraries for references to wordexp using `nm -D <binary> | grep wordexp` or `strings <binary> | grep wordexp`. Review application source code for calls to wordexp().Affected if Any application in the environment links against or calls wordexp()
-
Identify applications accepting untrusted input patternsReview application code or configuration for paths where user-supplied or external input could be passed to wordexp. Check for patterns like wordexp(user_input, ...).Affected if Applications pass untrusted, user-supplied, or external data to wordexp without sanitization
-
Check NetApp product versionsFor affected NetApp products (Active IQ Unified Manager, E-Series Santricity OS Controller 11.0-11.70.1, HCI Management Node, ONTAP Select Deploy, Solidfire), run the appropriate version command or check the product documentation for the bundled glibc version.Affected if The NetApp product is running and uses the vulnerable glibc version (check product-specific version reporting)
-
Test wordexp behavior with crafted inputIf wordexp is in use, create a test program that calls wordexp() with specially crafted input containing many $VAR or $(command) expansions to observe if it crashes or reads incorrect memory.Affected if The wordexp function crashes, hangs, or produces unexpected output when processing crafted patterns containing variable expansions
You are affected if your system runs glibc version less than 2.31 AND any application uses wordexp() with untrusted or user-supplied input patterns.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scoped2.31
Update glibc to a version containing the patch (2.34 or later); until then, avoid using wordexp with untrusted or user-supplied input patterns.
glibc >= 2.31
- 1. Check the current glibc version installed: `ldd --version` or `rpm -q glibc` / `dpkg -l libc6`
- 2. Update your system's package repository to ensure you have access to the latest packages: `apt-get update` (Debian/Ubuntu) or `yum update` (RHEL/CentOS)
- 3. Upgrade glibc to version 2.31 or later: `apt-get install libc6` (Debian/Ubuntu) or `yum update glibc` (RHEL/CentOS)
- 4. After upgrading glibc, reboot the system to ensure all services use the updated library: `reboot`
- 5. Verify the fix by checking the new glibc version: `ldd --version` and confirm it shows version 2.31 or higher
- 6. Test the wordexp functionality to ensure it no longer crashes with crafted patterns
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation4.0 h
- Implementation2.0 h
- Testing4.0 h
- Review / QA2.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $3,392.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2021-35942 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2021-35942 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data