CVE-2018-9159 · mitre
CVE-2018-9159
In Spark before 2.7.2, a remote attacker can read unintended static files via various representations of absolute or relative pathnames, as demonstrated by file: URLs and directory traversal sequences. NOTE: this product is unrelated to Ignite Realtime Spark.
Published 2018-03-31, last changed 2026-06-17. Weakness: CWE-22.
How to fix
Upgrade to a fixed version: com.sparkjava:spark-core 2.7.2 (Maven). For the version that clears every advisory for your installed version, ask an agent for get_remediation.
Where the flaw is in the code
Fixed in perwendel/spark by 030e9d0012, a221a864db, ce9e11517e. Functions changed by the fix: ClassPathResource, doesNotContainFileColon, isValid, isInvalidPath, equals, getPath, exists, getInputStream, getURL, createRelative. Regression tests: src/test/java/spark/embeddedserver/jetty/EmbeddedJettyFactoryTest.java, src/test/java/spark/examples/staticresources/StaticResources.java. Confidence: verified (a record names this commit as the fix, and it changed these functions).
Timeline
| 2018-03-31 | Published |
| 2018-10-19 | Package advisory GHSA-76qr-mmh8-cp8f |
| 2026-06-17 | Record last changed |
| 2026-11-30 | EPSS when our history starts: 4.45% |
| 2026-12-02 | Code-level analysis added |
Affected packages
| Advisory | Package | Fixed in |
|---|---|---|
| GHSA-76qr-mmh8-cp8f | com.sparkjava:spark-core (Maven) | 2.7.2 |
Also known as: GHSA-76qr-mmh8-cp8f
Related
| CVE | Published | CVSS | Summary |
|---|---|---|---|
| CVE-2016-9177 | 2016-11-04 | 7.5 | same package: com.sparkjava:spark-core (Maven) |
| CVE-2026-138340 | 2026-11-29 | 6.5 | same weakness (CWE-22) from the same CNA (mitre) |
| CVE-2026-117373 | 2026-11-11 | 6.5 | same weakness (CWE-22) from the same CNA (mitre) |
| CVE-2026-38600 | 2026-11-03 | 9.8 | same weakness (CWE-22) from the same CNA (mitre) |
| CVE-2026-38595 | 2026-11-03 | 9.8 | same weakness (CWE-22) from the same CNA (mitre) |
| CVE-2026-117127 | 2026-11-02 | 7.5 | same weakness (CWE-22) from the same CNA (mitre) |
| CVE-2026-117183 | 2026-10-30 | 7.5 | same weakness (CWE-22) from the same CNA (mitre) |
| CVE-2026-51912 | 2026-10-29 | 9.8 | same weakness (CWE-22) from the same CNA (mitre) |
Add it to your agent
One command for Claude Code; setup for Claude Desktop, Cursor and others. No signup or key.
claude mcp add --transport http keygraph-cve https://cve-mcp.keygraph.io/mcp
Then ask for triage_cve CVE-2018-9159, or call /api/v1/vulnerabilities/CVE-2018-9159. To prove whether it is exploitable in your running app, run Shannon, Keygraph's open-source AI pentester.