# CVE-2017-4995: Deserialization of Untrusted Data in Spring Security

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 8.1
- **CVSS:** 8.1 (v3.1, NVD) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: High; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 2.55% (percentile 86, 2026-11-26)
- **CWE:** CWE-502
- **Aliases:** GHSA-vhrg-v3cv-p247
- **Published:** 2017-11-27T10:00:00.000Z
- **Modified:** 2026-06-17T01:19:42.377Z

## Who should check

- Projects that depend on Maven package org.springframework.security:spring-security-core (\>= 4.2.0.RELEASE, \< 4.2.3.RELEASE)
- Anyone running Spring Security Spring Security 4.2.0.RELEASE 4.2.2.RELEASE and Spring Security 5.0.0.M1 Spring Security Spring Security 4.2.0.RELEASE 4.2.2.RELEASE and Spring Security 5.0.0.M1

## 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.

## Affected and fixed versions

- Maven `org.springframework.security:spring-security-core`: affected \>= 4.2.0.RELEASE, \< 4.2.3.RELEASE; fixed 4.2.3.RELEASE, 5.0.0.M2 (osv)
- Spring Security Spring Security 4.2.0.RELEASE 4.2.2.RELEASE and Spring Security 5.0.0.M1: Spring Security Spring Security 4.2.0.RELEASE 4.2.2.RELEASE and Spring Security 5.0.0.M1 (cvelist)

## Mitigation

- Upgrade org.springframework.security:spring-security-core to one of 4.2.3.RELEASE, 5.0.0.M2 (or later in the same release line).

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2017-4995. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2017-4995.md
Affected: org.springframework.security:spring-security-core >= 4.2.0.RELEASE, < 4.2.3.RELEASE
Fixed in: 4.2.3.RELEASE, 5.0.0.M2

Steps:
1. Search this machine and project for org.springframework.security:spring-security-core (Maven), Spring Security Spring Security 4.2.0.RELEASE 4.2.2.RELEASE and Spring Security 5.0.0.M1: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2017-4995 being exploited?

There is no confirmed exploitation: CVE-2017-4995 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 2.55% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2017-4995?

High: CVSS 8.1 (v3.1, scored by NVD). Remote, no login needed. The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2017-4995?

org.springframework.security:spring-security-core \>= 4.2.0.RELEASE, \< 4.2.3.RELEASE.

### Is there a fix for CVE-2017-4995?

Yes. Fixed in 4.2.3.RELEASE, 5.0.0.M2. Upgrade org.springframework.security:spring-security-core to one of 4.2.3.RELEASE, 5.0.0.M2 (or later in the same release line).

### How do I check if I'm affected by CVE-2017-4995?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://pivotal.io/security/cve-2017-4995>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2017-4995>
- patch: <https://github.com/FasterXML/jackson-databind/commit/60d459cedcf079c6106ae7da2ac562bc32dcabe1>
- patch: <https://github.com/FasterXML/jackson-databind/commit/6ce32ffd18facac6abdbbf559c817b47fcb622c>
- other: <http://www.securityfocus.com/bid/99080>
- other: <https://lists.apache.org/thread.html/4641ed8616ccc2c1fbddac2c3dc9900c96387bc226eaf0232d61909b%40%3Ccommits.cassandra.apache.org%3E>
- other: <https://lists.apache.org/thread.html/rf7f87810c38dc9abf9f93989f76008f504cbf7c1a355214640b2d04c%40%3Ccommits.cassandra.apache.org%3E>
- other: <https://lists.apache.org/thread.html/r42ac3e39e6265db12d9fc6ae1cd4b5fea7aed9830dc6f6d58228fed7%40%3Ccommits.cassandra.apache.org%3E>
- other: <https://github.com/FasterXML/jackson-databind/issues/1599>
- other: <https://github.com/spring-projects/spring-security/issues/4370>
- other: <https://lists.apache.org/thread.html/4641ed8616ccc2c1fbddac2c3dc9900c96387bc226eaf0232d61909b@%3Ccommits.cassandra.apache.org%3E>
- other: <https://lists.apache.org/thread.html/r42ac3e39e6265db12d9fc6ae1cd4b5fea7aed9830dc6f6d58228fed7@%3Ccommits.cassandra.apache.org%3E>
- other: <https://lists.apache.org/thread.html/rf7f87810c38dc9abf9f93989f76008f504cbf7c1a355214640b2d04c@%3Ccommits.cassandra.apache.org%3E>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2017-4995>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-vhrg-v3cv-p247> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2017-4995> · JSON: <https://flawdb.com/api/v1/entries/CVE-2017-4995>
