Skip to content
OpenAdvisories
Medium · 5.3 Public exploit CVE-2022-22976 EUVD-2022-5665GHSA-wx54-3278-m5g4

Integer overflow in BCrypt class in Spring Security

Published May 19, 2022 · Updated Aug 3, 2024 · Assigned by vmware

Description

Spring Security versions 5.5.x prior to 5.5.7, 5.6.x prior to 5.6.4, and earlier unsupported versions contain an integer overflow vulnerability. When using the BCrypt class with the maximum work factor (31), the encoder does not perform any salt rounds, due to an integer overflow error. The default settings are not affected by this CVE.

Affected products

VendorProductAffectedFixed
— Spring Security Spring Security versions 5.5.x prior to 5.5.7, 5.6.x prior to 5.6.4, and earlier unsupported versions —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Ubuntu 26.10 libspring-java No fix yet —
Ubuntu 26.04 LTS libspring-java No fix yet —
Ubuntu 25.10 libspring-java No fix yet —
Show 6 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 24.04 LTS libspring-java No fix yet —
Ubuntu Pro 22.04 LTS libspring-java No fix yet —
Ubuntu Pro 20.04 LTS libspring-java No fix yet —
Ubuntu Pro 18.04 LTS libspring-java No fix yet —
Ubuntu Pro 16.04 LTS libspring-java No fix yet —
Ubuntu Pro 14.04 LTS libspring-java No fix yet —
ReleasePackageFixed inAdvisory
Red Hat Ocp Tools 4 jenkins 2.401.1.1686831596-3.el8 RHSA-2023:3663
Red Hat Ocp Tools 4 jenkins-2-plugins 4.11.1686831822-1.el8 RHSA-2023:3663

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

GitHub 1 repository

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Affected packages

EcosystemPackageAffectedFixedRecord
Maven org.springframework.security:spring-security-core >= 5.2.0.RELEASE, < 5.5.7 5.5.7 GHSA-wx54-3278-m5g4
Maven org.springframework.security:spring-security-core >= 5.6.0, < 5.6.4 5.6.4 GHSA-wx54-3278-m5g4

Advisories 3

References