CVE-2022-31023 json
Dev error stack trace leaking into prod in Play Framework
published 2022-06-02 4 y ago modified 2026-06-17 4 mo ago also GHSA-p9p4-97g9-wcrh , EUVD-2022-6107
- cvss
- 5.9
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.3%
- EPSS 1.3% chance of exploitation in 30 days, percentile 71%
- public exploits
- 0
- none known
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.
Patch / fix
- maven com.typesafe.play:play_2.12 2.8.16
- maven com.typesafe.play:play_2.13 2.8.16
- lightbend play_framework 2.8.16
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 18 mo ago
Exploit prediction
1.35% chance of exploitation in the next 30 days, higher than 71% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N |
| NVD | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| NVD | 2.0 | 5.0 | AV:N/AC:L/Au:N/C:P/I:N/A:N |
| GitHub | 3.1 | 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| maven | com.typesafe.play:play_2.12 | <2.8.16 |
2.8.16 |
| maven | com.typesafe.play:play_2.13 | <2.8.16 |
2.8.16 |
Affected products
- playframework playframework
Classification
- Weakness
-
- CWE-209 Generation of Error Message Containing Sensitive Information
References
-
github.com
/playframework/playframework/pull/11305
web, issue-tracking, patch, third-party-advisory
-
github.com
/playframework/playframework/releases/tag/2.8.16
web, release-notes, third-party-advisory
-
github.com
/playframework/playframework/security/advisories/GHSA-p9p4-97g9-wcrh
web, mitigation, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2022-31023
advisory
-
github.com
/playframework/playframework
package
Sources
- CVE List CVE-2022-31023
- GitHub Advisory GHSA-p9p4-97g9-wcrh
- NVD CVE-2022-31023
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.