CVE-2021-32742
JSON

7.5high

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

Severity
7.5high CVSS:3.1 by GitHub_M
Exploit likelihood
1.20% (higher than 69% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-pqwh-c2f3-vxmq

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

Affected

Product or packageVersionsReported by
vapor vapor<= 4.47.1CVE List
github.com/vapor/vapor (SwiftURL)before 4.47.2GitHub Advisory Database
vapor_project vaporbefore 4.47.2NVD

All scores

GitHub_M7.5high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
GitHubmedium rating
NVD9.1critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
NVD6.4medium CVSS:2.0AV:N/AC:L/Au:N/C:P/I:N/A:P

Classification

What each source says

CVE List

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

GitHub Advisory Database
Impact

A 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.

Patches

This issue has been patched in 4.47.2.

Workarounds

Use an alternative to Vapor's built-in Data.init(base32Encoded:).

For more information

If you have any questions or comments about this advisory:

NVD (es)

Vapor es un framework web para Swift. En las versiones 4.47.1 y anteriores, un bug en la función "Data.init(base32Encoded:)" abre el potencial para exponer la memoria del servidor y/o de bloquear el servidor (Denegación de Servicio) para aplicaciones en las que datos no confiables pueden terminar en dicha función. Vapor no usa actualmente esta función por sí mismo, por lo que esto sólo afecta a las aplicaciones que usan la función impactada directamente o mediante otras dependencias. La vulnerabilidad está parcheada en la versión 4.47.2. Como solución alternativa, se puede usar una alternativa a la función incorporada de Vapor "Data.init(base32Encoded:)"

References

Sources

SourceRecordLicence
CVE ListCVE-2021-32742 changed 2024-08-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-pqwh-c2f3-vxmq changed 2026-07-08CC-BY-4.0
NVDCVE-2021-32742 changed 2026-06-17Public domain