CVE-2018-18855 — spray-json_2.10
Fix: spray/spray-json#284CVE-2018-18855 is a remote code execution vulnerability in io.spray:spray-json_2.10. A fix is available for io.spray:spray-json_2.10 — see the affected versions and patch details below.
Uncontrolled Resource Consumption in Spray JSON
Real-World Exposure
io.spray:spray-json_2.10☕io.spray:spray-json_2.11☕io.spray:spray-json_2.11.0-RC4☕io.spray:spray-json_2.12☕io.spray:spray-json_2.12.0-M3☕io.spray:spray-json_2.12.0-M5☕io.spray:spray-json_2.12.0-RC1☕io.spray:spray-json_2.12.0-RC2+4 moreReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.
Description
Recursive decent parsers are susceptible too StackOverflowExceptions on too deeply nested structures as currently "open" parsing state is kept on the stack.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | io.spray:spray-json_2.10 | all versions | 1.3.5io.spray:spray-json_2.10:1.3.5 |
| ☕Maven | io.spray:spray-json_2.11 | all versions | 1.3.5io.spray:spray-json_2.11:1.3.5 |
| ☕Maven | io.spray:spray-json_2.11.0-RC4 | all versions | No fix |
| ☕Maven | io.spray:spray-json_2.12 | all versions | 1.3.5io.spray:spray-json_2.12:1.3.5 |
| ☕Maven | io.spray:spray-json_2.12.0-M3 | all versions | No fix |
| ☕Maven | io.spray:spray-json_2.12.0-M5 | all versions | No fix |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for io.spray:spray-json_2.10, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update io.spray:spray-json_2.10 to 1.3.5 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2018-18855 is resolved across your whole dependency graph.
Workarounds
Stop feeding it untrusted input: reject or quarantine files and payloads from unverified sources until you can upgrade, restrict accepted formats to the ones you actually need, and run the parsing or decoding step in a least-privileged sandbox or short-lived worker so a crash or corrupted read cannot reach the rest of the process.
Frequently Asked Questions
Is CVE-2018-18855 in your dependencies?
Find it across Maven, including transitive dependencies.