CVE-2026-47842

Description

A flaw was found in Spring Security. Applications configured to use AesBytesEncryptor with a two-argument constructor or a null Initialization Vector (IV) generator in Cipher Block Chaining (CBC) mode will encrypt data using a predictable, all-zero IV. This deterministic encryption allows an attacker to analyze encrypted data and potentially deduce patterns, leading to the disclosure of sensitive information.

Statement

A flaw was found in Spring Security. Applications using AesBytesEncryptor with the two-argument constructor or when passing a null IV generator and CBC as the encryption mode encrypt data with AES/CBC using a fixed all-zero initialization vector. Because the IV is deterministic, identical plaintexts always produce identical ciphertext for a given password and salt. An attacker with read access to the encrypted data store can exploit this to determine when two records share the same plaintext value, correlate encrypted values across rows or users, and mount dictionary attacks by pre-encrypting candidate values and comparing results. This is a continuation of CVE-2020-5408.

Mitigation

Upgrade to a fixed version of Spring Security (7.1.1, 7.0.7, 6.5.12, 6.4.19, 5.8.28, or 5.7.26). Alternatively, migrate from the deprecated AesBytesEncryptor to the new AesCbcBytesEncryptor or AesGcmBytesEncryptor classes which use secure random IV generation. If using Encryptors.standard(), Encryptors.stronger(), Encryptors.text(), or Encryptors.delux(), these are also deprecated and should be replaced. Review the Spring Security migration guide to determine whether data re-encryption is required.

Common Vulnerability Scoring System (CVSS) Score Details

Info alert:Important note

CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).

The following CVSS metrics and score provided are preliminary and subject to review.

CVSS v3 Score Breakdown

Red HatNVDcve.org
Base Score6.5N/A6.5
Attack VectorNetworkN/ANetwork
Attack ComplexityLowN/ALow
Privileges RequiredLowN/ALow
User InteractionNoneN/ANone
ScopeUnchangedN/AUnchanged
ConfidentialityHighN/AHigh
Integrity ImpactNoneN/ANone
Availability ImpactNoneN/ANone

Vector

Red Hat: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

cve.org: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

Understanding the Weakness (CWE)

Confidentiality

Technical Impact: Read Application Data

If the IV is not properly initialized, data that is encrypted can be compromised and information about the data can be leaked. See [REF-1179].

Frequently Asked Questions

Want to get errata notifications? Sign up here.