CVE-2021-32742 json
Untrusted data fed into `Data.init(base32Encoded:)` can result in exposing server memory and/or crash
published 2021-07-09 5 y ago modified 2026-07-08 4 mo ago also EUVD-2023-1859 , GHSA-pqwh-c2f3-vxmq
- cvss
- 7.5
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.2%
- EPSS 1.2% chance of exploitation in 30 days, percentile 68%
- public exploits
- 0
- none known
Summary
Vapor 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:)`.
Patch / fix
- swift github.com/vapor/vapor 4.47.2
- vapor_project vapor 4.47.2
Exploit prediction
1.20% chance of exploitation in the next 30 days, higher than 68% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | 3.1 | 9.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H |
| NVD | 2.0 | 6.4 | AV:N/AC:L/Au:N/C:P/I:N/A:P |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| swift | github.com/vapor/vapor | <4.47.2 |
4.47.2 |
Affected products
- vapor vapor
Classification
- Weakness
-
- CWE-502 Deserialization of Untrusted Data
References
-
github.com
/vapor/vapor/security/advisories/GHSA-pqwh-c2f3-vxmq
web, third-party-advisory
-
github.com
/vapor/vapor/releases/tag/4.47.2
web, release-notes, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-32742
advisory
-
github.com
/vapor/vapor
package
Sources
- CVE List CVE-2021-32742
- GitHub Advisory GHSA-pqwh-c2f3-vxmq
- NVD CVE-2021-32742
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.