CVE-2017-4995

CVE-2017-4995 is a high-severity insecure deserialization vulnerability in org.springframework.security:spring-security-core (maven), affecting versions = 5.0.0.M1. It is fixed in 5.0.0.M2, 4.2.3.RELEASE.

Summary

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.

Impact

Untrusted serialized data is processed by a deserializer that can instantiate arbitrary objects or execute code as a side effect. Typical impact: arbitrary code execution or logic abuse.

CVE-2017-4995 has a CVSS score of 8.1 (High). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (5.0.0.M2, 4.2.3.RELEASE); upgrading removes the vulnerable code path.

Affected versions

org.springframework.security:spring-security-core (= 5.0.0.M1) org.springframework.security:spring-security-core (>= 4.2.0.RELEASE, <= 4.2.2.RELEASE)

Security releases

org.springframework.security:spring-security-core → 5.0.0.M2 (maven) org.springframework.security:spring-security-core → 4.2.3.RELEASE (maven)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

Upgrade the following packages to resolve this vulnerability:

org.springframework.security:spring-security-core to 5.0.0.M2 or later; org.springframework.security:spring-security-core to 4.2.3.RELEASE or later

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is CVE-2017-4995? CVE-2017-4995 is a high-severity insecure deserialization vulnerability in org.springframework.security:spring-security-core (maven), affecting versions = 5.0.0.M1. It is fixed in 5.0.0.M2, 4.2.3.RELEASE. Untrusted serialized data is processed by a deserializer that can instantiate arbitrary objects or execute code as a side effect.
  2. How severe is CVE-2017-4995? CVE-2017-4995 has a CVSS score of 8.1 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of org.springframework.security:spring-security-core are affected by CVE-2017-4995? org.springframework.security:spring-security-core (maven) versions = 5.0.0.M1 is affected.
  4. Is there a fix for CVE-2017-4995? Yes. CVE-2017-4995 is fixed in 5.0.0.M2, 4.2.3.RELEASE. Upgrade to this version or later.
  5. Is CVE-2017-4995 exploitable, and should I be worried? Whether CVE-2017-4995 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2017-4995 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2017-4995?
    • Upgrade org.springframework.security:spring-security-core to 5.0.0.M2 or later
    • Upgrade org.springframework.security:spring-security-core to 4.2.3.RELEASE or later

Other vulnerabilities in org.springframework.security:spring-security-core

CVE-2026-22746CVE-2025-22234CVE-2025-41248CVE-2025-41232CVE-2025-22223

Stop the waste.
Protect your environment with Kodem.