# CVE-2018-1199: Improper Input Validation in org.springframework.security:spring-security-core, org.springframework.security:spring-security-core , and org.springframework:spring-core

> Attackers can bypass security constraints on static resources by using specially encoded URL path parameters, requiring an upgrade to patched versions.

- **Severity:** Medium 5.3 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 16 Mar 2018
- **Updated:** 16 Sep 2024
- **Also known as:** DEBIAN-CVE-2018-1199, GHSA-v596-fwhq-8x48, UBUNTU-CVE-2018-1199

## What is CVE-2018-1199?

CVE-2018-1199 is a medium-severity vulnerability in Oracle Retail Xstore Point of Service, published on 16 Mar 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Spring Security (Spring Security 4.1.x before 4.1.5, 4.2.x before 4.2.4, and 5.0.x before 5.0.1; and Spring Framework 4.3.x before 4.3.14 and 5.0.x before 5.0.3) does not consider URL path parameters when processing security constraints. By adding a URL path parameter with special encodings, an attacker may be able to bypass a security constraint. The root cause of this issue is a lack of clarity regarding the handling of path parameters in the Servlet Specification. Some Servlet containers include path parameters in the value returned for getPathInfo() and some do not. Spring Security uses the value returned by getPathInfo() as part of the process of mapping requests to security constraints. In this particular attack, different character encodings used in path parameters allows secured Spring MVC static resource URLs to be bypassed.

Weakness: CWE-20 (Improper Input Validation)

## Which versions are affected by CVE-2018-1199?

10 open source packages ship an affected version, including org.springframework.security:spring-security-core and org.springframework:spring-core. It affects 5 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.springframework.security:spring-security-core` | Maven | From 4.1.0 | 4.1.5 |
| `org.springframework.security:spring-security-core` | Maven | From 4.1.0 | 4.1.5 |
| `org.springframework.security:spring-security-core` | Maven | From 4.2.0 | 4.2.4 |
| `org.springframework.security:spring-security-core` | Maven | From 4.2.0 | 4.2.4 |
| `org.springframework.security:spring-security-core` | Maven | From 5.0.0 | 5.0.1 |
| `org.springframework.security:spring-security-core` | Maven | From 5.0.0 | 5.0.1 |
| `org.springframework:spring-core` | Maven | From 4.3.0 | 4.3.14 |
| `org.springframework:spring-core` | Maven | From 4.3.0 | 4.3.14 |
| `org.springframework:spring-core` | Maven | From 5.0.0 | 5.0.3 |
| `org.springframework:spring-core` | Maven | From 5.0.0 | 5.0.3 |

Products: Oracle Rapid Planning, Oracle Retail Xstore Point of Service, Redhat Fuse, Vmware Spring Framework, Vmware Spring Security.

## How do I fix CVE-2018-1199?

Upgrade org.springframework.security:spring-security-core to a fixed version for your release line: 4.1.5, 4.2.4 or 5.0.1.

## Is CVE-2018-1199 being exploited?

There is no known exploitation of CVE-2018-1199 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2018-1199 and fix it if it is affected.

What it is: CVE-2018-1199 is a medium-severity vulnerability in Oracle Retail Xstore Point of Service, published on 16 Mar 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2018-1199 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.springframework.security:spring-security-core (Maven): affected from 4.1.0; fixed in 4.1.5
- org.springframework.security:spring-security-core (Maven): affected from 4.1.0; fixed in 4.1.5
- org.springframework.security:spring-security-core (Maven): affected from 4.2.0; fixed in 4.2.4
- org.springframework.security:spring-security-core (Maven): affected from 4.2.0; fixed in 4.2.4
- org.springframework.security:spring-security-core (Maven): affected from 5.0.0; fixed in 5.0.1
- org.springframework.security:spring-security-core (Maven): affected from 5.0.0; fixed in 5.0.1
- org.springframework:spring-core (Maven): affected from 4.3.0; fixed in 4.3.14
- org.springframework:spring-core (Maven): affected from 4.3.0; fixed in 4.3.14
- org.springframework:spring-core (Maven): affected from 5.0.0; fixed in 5.0.3
- org.springframework:spring-core (Maven): affected from 5.0.0; fixed in 5.0.3

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2018-1199/ (Markdown: https://insights.sbomify.com/CVE-2018-1199/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2018-1199
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2018-1199
- OSV: https://osv.dev/vulnerability/CVE-2018-1199

---
From sbomify Insights: https://insights.sbomify.com/CVE-2018-1199/
Summaries are generated and may contain mistakes; the official description above is the record.
