CVE-2019-3795: Spring Framework Spring Security Uses Insufficiently Random Vulnerability
MODERATECVE-2019-3795 is a MODERATE (CVSS 5.3) spring security uses insufficiently random vulnerability (CWE-330: Use of Insufficiently Random Values) affecting Spring Framework libraries in the Maven ecosystem. The issue involves spring security uses insufficiently random values. Remediation is available by upgrading affected packages to version 4.2.12, 5.0.12, 5.1.5.
CVE-2019-3795 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N).
How to Fix CVE-2019-3795
To remediate this vulnerability, upgrade all affected Spring Framework dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>4.2.12</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>5.0.12</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>5.1.5</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=org.springframework.security
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2019-3795, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.springframework.security
Analyze the terminal output to locate any version of Spring Framework in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.2.12), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.springframework.security command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-330: Use of Insufficiently Random Values, where the product uses insufficiently random numbers or values in a security context that depends on unpredictable numbers. In Spring Framework, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2019-3795 Affected Spring Framework Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.springframework.security:spring-security-core
|
Maven |
≥ 4.2.0
< 4.2.12
|
4.2.12
|
|
org.springframework.security:spring-security-core
|
Maven |
≥ 5.0.0
< 5.0.12
|
5.0.12
|
|
org.springframework.security:spring-security-core
|
Maven |
≥ 5.1.0
< 5.1.5
|
5.1.5
|
References
Frequently Asked Questions
What is CVE-2019-3795?
Which Spring Framework versions are affected?
What version fixes CVE-2019-3795?
Is spring-security-core affected?
What is the CVSS score of CVE-2019-3795?
What CWE is associated with CVE-2019-3795?
How can I check Maven dependencies for CVE-2019-3795?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-v2r2-7qm7-jj6v",
"modified" : "2022-11-17T19:45:44Z",
"published" : "2019-04-16T15:10:59Z",
"aliases" : [ "CVE-2019-3795" ],
"summary" : "Spring Security uses insufficiently random values",
"details" : "Spring Security versions 4.2.x prior to 4.2.12, 5.0.x prior to 5.0.12, and 5.1.x prior to 5.1.5 contain an insecure randomness vulnerability when using SecureRandomFactoryBean#setSeed to configure a SecureRandom instance. In order to be impacted, an honest application must provide a seed and make the resulting random material available to an attacker for inspection.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.springframework.security:spring-security-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.2.0"
}, {
"fixed" : "4.2.12"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.springframework.security:spring-security-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.0.0"
}, {
"fixed" : "5.0.12"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.springframework.security:spring-security-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.1.0"
}, {
"fixed" : "5.1.5"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-3795"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-v2r2-7qm7-jj6v"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2019/05/msg00026.html"
}, {
"type" : "WEB",
"url" : "https://pivotal.io/security/cve-2019-3795"
}, {
"type" : "WEB",
"url" : "http://www.securityfocus.com/bid/107802"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-330" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T21:56:26Z",
"nvd_published_at" : "2019-04-09T16:29:00Z"
}
}