# CVE-2019-3802: Additional information exposure with Spring Data JPA example matcher

> Attackers can retrieve unintended data from Spring Data JPA queries by supplying maliciously crafted example values to specific string matchers.

- **Severity:** Low 3.5 (`CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 3 Jun 2019
- **Updated:** 17 Sep 2024
- **Also known as:** GHSA-xggx-fx6w-v7ch

## What is CVE-2019-3802?

CVE-2019-3802 is a low-severity vulnerability in Spring Data JPA, published on 3 Jun 2019. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

### Official description

This affects Spring Data JPA in versions up to and including 2.1.6, 2.0.14 and 1.11.20. ExampleMatcher using ExampleMatcher.StringMatcher.STARTING, ExampleMatcher.StringMatcher.ENDING or ExampleMatcher.StringMatcher.CONTAINING could return more results than anticipated when a maliciously crafted example value is supplied.

Weakness: CWE-155 (Improper Neutralization of Wildcards or Matching Symbols)

## Which versions are affected by CVE-2019-3802?

6 open source packages ship an affected version, including org.springframework.data:spring-data-jpa. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.springframework.data:spring-data-jpa` | Maven | All versions | 1.11.22 |
| `org.springframework.data:spring-data-jpa` | Maven | All versions | 1.11.22 |
| `org.springframework.data:spring-data-jpa` | Maven | From 2.0.0 | 2.1.8 |
| `org.springframework.data:spring-data-jpa` | Maven | From 2.0.0 | 2.1.8 |
| `org.springframework.data:spring-data-jpa` | Maven | From 2.1.0 | 2.1.8 |
| `org.springframework.data:spring-data-jpa` | Maven | From 2.1.0 | 2.1.8 |

Products: Pivotal Software Spring Data Java Persistance Api.

## How do I fix CVE-2019-3802?

Upgrade org.springframework.data:spring-data-jpa to a fixed version for your release line: 1.11.22 or 2.1.8.

## Is CVE-2019-3802 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2019-3802 and fix it if it is affected.

What it is: CVE-2019-3802 is a low-severity vulnerability in Spring Data JPA, published on 3 Jun 2019. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2019-3802 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.springframework.data:spring-data-jpa (Maven): affected all versions; fixed in 1.11.22
- org.springframework.data:spring-data-jpa (Maven): affected all versions; fixed in 1.11.22
- org.springframework.data:spring-data-jpa (Maven): affected from 2.0.0; fixed in 2.1.8
- org.springframework.data:spring-data-jpa (Maven): affected from 2.0.0; fixed in 2.1.8
- org.springframework.data:spring-data-jpa (Maven): affected from 2.1.0; fixed in 2.1.8
- org.springframework.data:spring-data-jpa (Maven): affected from 2.1.0; fixed in 2.1.8

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-2019-3802/ (Markdown: https://insights.sbomify.com/CVE-2019-3802/index.md)
```

## Sources

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

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