CVE-2017-4995

Description

An issue was discovered in Pivotal Spring Security 4.2.0.RELEASE through 4.2.2.RELEASE, and Spring Security 5.0.0.M1. When configured to enable default typing, Jackson contained a deserialization vulnerability that could lead to arbitrary code execution. Jackson fixed this vulnerability by blacklisting known "deserialization gadgets." Spring Security configures Jackson with global default typing enabled, which means that (through the previous exploit) arbitrary code could be executed if all of the following is true: (1) Spring Security's Jackson support is being leveraged by invoking SecurityJackson2Modules.getModules(ClassLoader) or SecurityJackson2Modules.enableDefaultTyping(ObjectMapper); (2) Jackson is used to deserialize data that is not trusted (Spring Security does not perform deserialization using Jackson, so this is an explicit choice of the user); and (3) there is an unknown (Jackson is not blacklisting it already) "deserialization gadget" that allows code execution present on the classpath. Jackson provides a blacklisting approach to protecting against this type of attack, but Spring Security should be proactive against blocking unknown "deserialization gadgets" when Spring Security enables default typing.

Severity
HIGH
CVSS v3
8.1
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H · source nvd
Exploit chance (EPSS)
2.547%
chance of exploitation in the next 30 days
higher than 85.3% of scored CVEs · 2026-11-17
CISA KEV
Not listed
Public exploit code
None public
Exploit references (NVD and CNA): 0
Metasploit modules: 0
Nuclei templates: 0

Weakness

Timeline

  1. 2017-11-27Published by the CNA10:00 UTC
  2. 2022-05-13GitHub advisory published (GHSA-vhrg-v3cv-p247)1628 days after publication

The timeline shows what already happened. To be told when this CVE changes next, watch it from the API.

Exploit and advisory records

GitHub advisory GHSA-vhrg-v3cv-p247, affected packages:

PackageVulnerable versionsFixed in
Maven org.springframework.security:spring-security-corefrom 4.2.0.RELEASE before 4.2.3.RELEASE4.2.3.RELEASE
Maven org.springframework.security:spring-security-corefrom 5.0.0.M1 before 5.0.0.M25.0.0.M2

Affected products

Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.

ProductVulnerable versionsFixed in
vmware spring_security4.2.0no fix listed4.2.1no fix listed4.2.2no fix listed5.0.0no fix listednot listednot listednot listednot listed

Products and versions as NVD and the vendor that published the CVE list them.

References

Get more CVE data from the API.

Free without a key or signup. Pro adds monitoring and higher limits: pricing.

Sources