Skip to content

GHSA-2ppp-9496-p23q CVE-2020-5408

Insufficient Entropy in Spring Security

Medium Maven
Severity
6.5 / 10
Medium · CVSS 3.1
Exploit chance (EPSS)
1.59%
Chance of exploitation in the next 30 days. Higher than 75.72% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-329 Generation of Predictable IV with CBC Mode
CWE-330 Use of Insufficiently Random Values
Fix
5.3.2
Upgrade org.springframework.security:spring-security-core to this version or later

Description

Spring Security versions 5.3.x prior to 5.3.2, 5.2.x prior to 5.2.4, 5.1.x prior to 5.1.10, 5.0.x prior to 5.0.16 and 4.2.x prior to 4.2.16 use a fixed null initialization vector with CBC Mode in the implementation of the queryable text encryptor. A malicious user with access to the data that has been encrypted using such an encryptor may be able to derive the unencrypted values using a dictionary attack.

Affected versions

Maven

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

org.springframework.security:spring-security-core Maven → 5.3.2

maven
<dependency><groupId>org.springframework.security</groupId><artifactId>spring-security-core</artifactId><version>5.3.2</version></dependency>
gradle
implementation("org.springframework.security:spring-security-core:5.3.2")

Severity breakdown

CVSS 3.1 6.5

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

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

Weakness

CWE-329: Generation of Predictable IV with CBC Mode

The product generates and uses a predictable initialization Vector (IV) with Cipher Block Chaining (CBC) Mode, which causes algorithms to be susceptible to dictionary attacks when they are encrypted under the same key.

How to prevent it
  • Implementation: NIST recommends two methods of generating unpredictable IVs for CBC mode [REF-1172]. The first is to generate the IV randomly. The second method is to encrypt a nonce with the same key and cipher to be used to encrypt the plaintext. In this case the nonce must be unique but can be predictable, since the block cipher will act as a pseudo random permutation.

CWE-330: Use of Insufficiently Random Values

The product uses insufficiently random numbers or values in a security context that depends on unpredictable numbers.

How to prevent it
  • Architecture and Design: Use a well-vetted algorithm that is currently considered to be strong by experts in the field, and select well-tested implementations with adequate length seeds. In general, if a pseudo-random number generator is not advertised as being cryptographically secure, then it is probably a statistical PRNG and should not be used in security-sensitive contexts. Pseudo-random number generators can produce predictable numbers if the generator is known and the seed can be guessed. A 256-bit seed is a good starting point for producing a "random enough" number.
  • Implementation: Consider a PRNG that re-seeds itself as needed from high quality pseudo-random output sources, such as hardware devices.
  • Architecture and Design, Requirements: Use products or modules that conform to FIPS 140-2 [REF-267] to avoid obvious entropy problems. Consult FIPS 140-2 Annex C ("Approved Random Number Generators").

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-vxf7-qj7q-83fh
Spring Security Vulnerable to User Attribute Enumeration when Using DaoAuthenticationProvider
Low Also affects org.springframework.security:spring-security-core
GHSA-x2wq-9x2f-fhj7
Spring Security Core has a TOCTOU race condition when One-Time Token login with JdbcOneTimeTokenService is configured
Medium Also affects org.springframework.security:spring-security-core
GHSA-vqxh-445g-37fc
Spring Security has a broken timing attack mitigation implemented in DaoAuthenticationProvide
Medium Also affects org.springframework.security:spring-security-core
GHSA-8v5q-rhf3-jphm
Spring Security annotation detection mechanism has authorization bypass
High Also affects org.springframework.security:spring-security-core
GHSA-9pp5-9c7g-4r83
Spring Security authorization bypass for method security annotations on private methods
Critical Also affects org.springframework.security:spring-security-core
GHSA-hh3m-g4qj-4835
Spring Security Vulnerable to Authorization Bypass via Security Annotations
Medium Also affects org.springframework.security:spring-security-core
GHSA-q3v6-hm2v-pw99
Spring Framework has Authorization Bypass for Case Sensitive Comparisons
Medium Also affects org.springframework.security:spring-security-core
GHSA-hmqf-wpq9-jq83
Spring Security Missing Authorization vulnerability
High Also affects org.springframework.security:spring-security-core
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor