CVE-2018-18854: Uncontrolled Resource Consumption in spray-json
Summary
CVE-2018-18854: Uncontrolled Resource Consumption in spray-json. Affects io.spray:spray-json_2.12 versions < 1.3.5. Fixed in 1.3.5. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The package under scrutiny is Lightbend Spray spray-json, which is a JSON library for Scala. It provides a simple and efficient way to parse, manipulate, and serialize JSON data. This vulnerability affects versions up to 1.3.4 of the library. The vulnerability arises due to Algorithmic Complexity during the parsing of JSON object fields with keys that have the same hash code.
Vulnerability Detail
The vulnerability allows remote attackers to cause a denial of service (resource consumption) by exploiting the algorithmic complexity issue in the parsing of JSON object fields. This can lead to excessive resource usage, potentially impacting the availability and performance of the affected system. The vulnerability has a CVSSv3 score of 7.5, indicating a high severity level.
How To Fix
Latest published version: 1.3.6 as of 23 Oct 2026
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
1.3.5
This is the first release that contains the fix.
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no specific workaround mentioned for this vulnerability.
Conclusion
In conclusion, the CVE-2018-18854 vulnerability in the spray-json library allows remote attackers to cause a denial of service by exploiting an algorithmic complexity issue during the parsing of JSON object fields. It is crucial to upgrade to version 1.3.5 or later to mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for io.spray:spray-json_2.12 →
FAQ
The vulnerability can be exploited by remote attackers to cause a denial of service by consuming excessive resources during the parsing of JSON object fields.
The CVSSv3 score for this vulnerability is 7.5, indicating a high severity level.
Versions up to 1.3.4 of the spray-json library are affected by this vulnerability.
To fix this vulnerability, it is recommended to upgrade to version 1.3.5 or later of the spray-json library.
No specific workaround has been mentioned for this vulnerability.
Related vulnerabilities
Recent vulnerabilities recorded for io.spray:spray-json_2.12.