CVE-2021-32742
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 · uneditedVapor is a web framework for Swift. In versions 4.47.1 and prior, bug in the `Data.init(base32Encoded:)` function opens up the potential for exposing server memory and/or crashing the server (Denial of Service) for applications where untrusted data can end up in said function. Vapor does not currently use this function itself so this only impact applications that use the impacted function directly or through other dependencies. The vulnerability is patched in version 4.47.2. As a workaround, one may use an alternative to Vapor's built-in `Data.init(base32Encoded:)`.
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 confidenceVapor's custom implementation of Data.init(base32Encoded:) contains a memory handling bug that allows attackers to either read arbitrary server memory contents or crash the server (DoS) by supplying crafted base32-encoded input. This affects applications using this function directly or indirectly through dependencies.
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< 4.47.2CVSS 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 Vapor as a dependencyReview your project's Package.swift or dependency manifest file for 'vapor' or 'vapor' package dependency, or check your project's installed packages listAffected if Vapor appears as a direct or transitive dependency in your project
-
Check installed Vapor versionRun 'swift package show-dependencies' or check your lock file (Package.resolved) to find the exact version of Vapor currently installedAffected if The installed version is lower than 4.47.2 (e.g., 4.47.1, 4.47.0, or any 4.x version below 4.47.2)
-
Search for base32 decode usageSearch your codebase for calls to 'Data(base32Encoded:)', 'init(base32Encoded:)', or imports of base32-related functionality from VaporAffected if Your code or any dependency uses Vapor's custom Data.init(base32Encoded:) implementation
-
Identify input sources for base32 decodingReview where base32-encoded data enters your application (HTTP parameters, file uploads, API payloads, database fields) and trace if it reaches Vapor's base32 decoderAffected if User-controlled or external input can reach the vulnerable Data.init(base32Encoded:) function
You are affected if your project uses Vapor version lower than 4.47.2 and any external or user-supplied data flows through Vapor's custom Data.init(base32Encoded:) method.
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 · scoped4.47.2
Upgrade Vapor to version 4.47.2 or later, or replace all uses of Vapor's Data.init(base32Encoded:) with Swift's native implementation or a third-party base32 library.
Vapor 4.47.2 or later
- Identify your current Vapor version in your Package.swift file
- Update the Vapor dependency in Package.swift to version 4.47.2 or later (e.g., from ".upToNextMinor" to ".upToNextMajor" or directly specify "4.47.2")
- Run 'swift package update' to fetch the updated dependencies
- Rebuild your application with 'swift build'
- Test that your application handles base32-encoded data correctly and does not crash
- Verify that server memory is not being exposed through base32 decoding
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation2.0 h
- Implementation4.0 h
- Testing6.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,808.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2021-32742 — 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-32742 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