CVE-2022-37454
JSON

9.8critical

Buffer overflow in sponge queue functions

Severity
9.8critical CVSS:3.1 by CISA-ADP
Exploit likelihood
7.41% (higher than 94% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
mitre
Also known as
GHSA-6w4m-2xhg-2658BIT-LIBPHP-2022-37454BIT-LIBPYTHON-2022-37454BIT-PHP-2022-37454BIT-PHP-MIN-2022-37454BIT-PYTHON-2022-37454BIT-PYTHON-MIN-2022-37454PSF-2022-11PYSEC-2026-504

Description

The Keccak XKCP SHA-3 reference implementation before fdc6fef has an integer overflow and resultant buffer overflow that allows attackers to execute arbitrary code or eliminate expected cryptographic properties. This occurs in the sponge function interface.

Affected

Product or packageVersionsReported by
Unspecified productn/aCVE List
pysha3 (PyPI)up to 1.0.2GitHub Advisory Database, PyPA Advisory Database
sha3 (RubyGems)before 1.0.5GitHub Advisory Database
https://github.com/python/cpythonbefore 0e4e058602d93b88256ff90bbef501ba20be9dd3, before 8088c90044ba04cd5624b278340ebf934dbee4a5, before 857efee6d2d43c5c12fc7e377ce437144c728ab8, before 948c6794711458fd148a3fa62296cadeeb2ed631Python Software Foundation
extended_keccak_code_package_project extended_keccak_code_packageNot specifiedNVD
debian debian_linux10.0, 11.0NVD
fedoraproject fedora35, 36NVD
php phpfrom 7.2.0 before 7.4.33, from 8.0.0 before 8.0.25, from 8.1.0 before 8.1.12NVD
python pythonfrom 3.6.0 before 3.7.16, from 3.8.0 before 3.8.16, from 3.9.0 before 3.9.16, from 3.10.0 before 3.10.9NVD
sha3_project sha3before 1.0.5NVD
pysha3_project pysha3Not specifiedNVD
pypy pypyfrom 7.0.0NVD

All scores

CISA-ADP9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
GitHub9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
PyPA Advisory Database9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Bitnami Vulnerability Databasecritical rating

Classification

CWE-190

SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total.

What each source says

CVE List

The Keccak XKCP SHA-3 reference implementation before fdc6fef has an integer overflow and resultant buffer overflow that allows attackers to execute arbitrary code or eliminate expected cryptographic properties. This occurs in the sponge function interface.

GitHub Advisory Database
Impact

The Keccak sponge function interface accepts partial inputs to be absorbed and partial outputs to be squeezed. A buffer can overflow when partial data with some specific sizes are queued, where at least one of them has a length of 2^32 - 200 bytes or more.

Patches

Yes, see commit fdc6fef0.

Workarounds

The problem can be avoided by limiting the size of the partial input data (or partial output digest) below 2^32 - 200 bytes. Multiple calls to the queue system can be chained at a higher level to retain the original functionality. Alternatively, one can process the entire input (or produce the entire output) at once, avoiding the queuing functions altogether.

References

See issue #105 for more details.

NVD (es)

La implementación de referencia de Keccak XKCP SHA-3 versiones anteriores a fdc6fef, presenta un desbordamiento de enteros y un desbordamiento de búfer resultante que permite a atacantes ejecutar código arbitrario o eliminar las propiedades criptográficas esperadas. Esto ocurre en la interfaz de la función sponge

References

https://csrc.nist.gov/projects/hash-functions/sha-3-projectadvisory, third-party-advisory, us-government-resource, web
https://mouha.be/sha-3-buffer-overflow/advisory, exploit, third-party-advisory, web
https://news.ycombinator.com/item?id=33281106advisory, issue-tracking, third-party-advisory, web
https://github.com/XKCP/XKCP/security/advisories/GHSA-6w4m-2xhg-2658advisory, patch, third-party-advisory, web
https://lists.debian.org/debian-lts-announce/2022/10/msg00041.htmladvisory, mailing-list, third-party-advisory, web
https://lists.debian.org/debian-lts-announce/2022/11/msg00000.htmladvisory, mailing-list, third-party-advisory, web
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CMIEXLMTW5GO36HTFFWIPB3OHZXCT3G4/advisory, mailing-list, third-party-advisory
https://www.debian.org/security/2022/dsa-5267advisory, third-party-advisory, web
https://www.debian.org/security/2022/dsa-5269advisory, third-party-advisory, web
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3ALQ6BDDPX5HU5YBQOBMDVAA2TSGDKIJ/advisory, mailing-list, third-party-advisory
https://eprint.iacr.org/2023/331web
https://news.ycombinator.com/item?id=35050307web

Sources

SourceRecordLicence
CVE ListCVE-2022-37454 changed 2026-10-14CVE Terms of Use
GitHub Advisory DatabaseGHSA-6w4m-2xhg-2658 changed 2026-11-16CC-BY-4.0
Python Software FoundationPSF-2022-11 changed 2026-06-29CC-BY-4.0
NVDCVE-2022-37454 changed 2026-10-14Public domain
PyPA Advisory DatabasePYSEC-2026-504 changed 2026-07-01CC-BY-4.0
Bitnami Vulnerability DatabaseBIT-LIBPHP-2022-37454 changed 2026-09-08Apache-2.0
Bitnami Vulnerability DatabaseBIT-LIBPYTHON-2022-37454 changed 2026-09-08Apache-2.0
Bitnami Vulnerability DatabaseBIT-PHP-2022-37454 changed 2026-09-08Apache-2.0
Bitnami Vulnerability DatabaseBIT-PHP-MIN-2022-37454 changed 2026-09-08Apache-2.0
Bitnami Vulnerability DatabaseBIT-PYTHON-2022-37454 changed 2026-09-08Apache-2.0
Bitnami Vulnerability DatabaseBIT-PYTHON-MIN-2022-37454 changed 2026-09-08Apache-2.0