Dev error stack trace leaking into prod in Play Framework
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Information disclosure
- Confidentiality · integrity · availability
- High · None · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-209.
Summary
Play Framework is a web framework for Java and Scala. Verions prior to 2.8.16 are vulnerable to generation of error messages containing sensitive information. Play Framework, when run in dev mode, shows verbose errors for easy debugging, including an exception stack trace. Play does this by configuring its `DefaultHttpErrorHandler` to do so based on the application mode. In its Scala API Play also provides a static object `DefaultHttpErrorHandler` that is configured to always show verbose errors. This is used as a default value in some Play APIs, so it is possible to inadvertently use this version in production. It is also possible to improperly configure the `DefaultHttpErrorHandler` object instance as the injected error handler. Both of these situations could result in verbose errors displaying to users in a production application, which could expose sensitive information from the application. In particular, the constructor for `CORSFilter` and `apply` method for `CORSActionBuilder` use the static object `DefaultHttpErrorHandler` as a default value. This is patched in Play Framework 2.8.16. The `DefaultHttpErrorHandler` object has been changed to use the prod-mode behavior, and `DevHttpErrorHandler` has been introduced for the dev-mode behavior. A workaround is available. When constructing a `CORSFilter` or `CORSActionBuilder`, ensure that a properly-configured error handler is passed. Generally this should be done by using the `HttpErrorHandler` instance provided through dependency injection or through Play's `BuiltInComponents`. Ensure that the application is not using the `DefaultHttpErrorHandler` static object in any code that may be run in production.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| playframework | playframework | before 2.8.16 | 2.8.16 | Patch available | CNA |
| — | com.typesafe.play:play_2.12 (Maven) | before 2.8.16 | 2.8.16 | Patch available | GHSA-p9p4-97g9-wcrh |
| — | com.typesafe.play:play_2.13 (Maven) | before 2.8.16 | 2.8.16 | Patch available | GHSA-p9p4-97g9-wcrh |
- playframework Vendorplayframework Affected before 2.8.16 Fixed in 2.8.16 Patch available CNA
- com.typesafe.play:play_2.12 (Maven) Vendor— Affected before 2.8.16 Fixed in 2.8.16 Patch available GHSA-p9p4-97g9-wcrh
- com.typesafe.play:play_2.13 (Maven) Vendor— Affected before 2.8.16 Fixed in 2.8.16 Patch available GHSA-p9p4-97g9-wcrh
Remediation
- Fix · CNA playframework (playframework) Fixed in 2.8.16
- Fix · GHSA-p9p4-97g9-wcrh com.typesafe.play:play_2.12 (Maven) Fixed in 2.8.16 Advisory →
- Fix · GHSA-p9p4-97g9-wcrh com.typesafe.play:play_2.13 (Maven) Fixed in 2.8.16 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2022-31023
- 2026-10-03 Alias added: GHSA-p9p4-97g9-wcrh
References
Advisory 3
More playframework vulnerabilities
- TI-2014-02951 XML external entity (XXE) vulnerability in the Java XML processing functionality in Play… CVSS 3.0CRITICAL 9.8
- TI-2022-13063 Denial of service binding form from JSON in Play Framework CVSS 3.1HIGH 7.5
- TI-2015-01932 Netty before 3.9.8.Final, 3.10.x before 3.10.3.Final, 4.0.x before 4.0.28.Final, and… CVSS 3.0HIGH 7.5
Sources
- CVE-2022-31023 · CVE Program
- CVE-2022-31023 · NVD
- FIRST EPSS
- GHSA-p9p4-97g9-wcrh · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences