# CVE-2021-32742: Untrusted data fed into `Data.init(base32Encoded:)` can result in exposing server memory and/or crash

- Severity: High 7.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.20%, higher than 69% of CVEs (2026-12-01)
- Published: 2021-07-09T14:00:11.000Z
- Modified: 2026-07-08T06:29:25.268Z
- Also known as: GHSA-pqwh-c2f3-vxmq
- Weaknesses: CWE-502
- Assigned by: GitHub_M

## Description

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:)`.

(As written by CVE List.)

## Affected

- vapor vapor: <= 4.47.1
- github.com/vapor/vapor (SwiftURL): before 4.47.2
- vapor_project vapor: before 4.47.2

## Every score

- GitHub_M: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`
- GitHub: rating Medium
- NVD: CVSS:3.1 9.1 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H`
- NVD: CVSS:2.0 6.4 Medium `AV:N/AC:L/Au:N/C:P/I:N/A:P`

## References

- <https://github.com/vapor/vapor/security/advisories/GHSA-pqwh-c2f3-vxmq> (third-party-advisory, web)
- <https://github.com/vapor/vapor/releases/tag/4.47.2> (release-notes, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-32742> (advisory)
- <https://github.com/vapor/vapor> (package)

## Sources

- CVE List: [CVE-2021-32742](https://www.cve.org/CVERecord?id=CVE-2021-32742), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-pqwh-c2f3-vxmq](https://github.com/advisories/GHSA-pqwh-c2f3-vxmq), CC-BY-4.0, modified 2026-07-08
- NVD: [CVE-2021-32742](https://nvd.nist.gov/vuln/detail/CVE-2021-32742), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-32742 · Whole record: https://cve.day/CVE-2021-32742.json · Rebuilt by cve.day 2026-11-25T22:58:02.493Z
