# CVE-2022-31023: Dev error stack trace leaking into prod in Play Framework

- Severity: Medium 5.9 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.36%, higher than 72% of CVEs (2026-11-30)
- Published: 2022-06-02T18:05:11.000Z
- Modified: 2026-06-17T04:44:37.600Z
- Also known as: GHSA-p9p4-97g9-wcrh
- Weaknesses: CWE-209
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- playframework playframework: < 2.8.16
- com.typesafe.play:play_2.12 (Maven): before 2.8.16
- com.typesafe.play:play_2.13 (Maven): before 2.8.16
- lightbend play_framework: before 2.8.16

## Every score

- GitHub_M: CVSS:3.1 5.9 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N`
- GitHub: CVSS:3.1 5.9 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- NVD: CVSS:2.0 5.0 Medium `AV:N/AC:L/Au:N/C:P/I:N/A:N`

## References

- <https://github.com/playframework/playframework/releases/tag/2.8.16> (release-notes, third-party-advisory, web)
- <https://github.com/playframework/playframework/security/advisories/GHSA-p9p4-97g9-wcrh> (mitigation, third-party-advisory, web)
- <https://github.com/playframework/playframework/pull/11305> (issue-tracking, patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-31023> (advisory)
- <https://github.com/playframework/playframework> (package)

## Sources

- CVE List: [CVE-2022-31023](https://www.cve.org/CVERecord?id=CVE-2022-31023), CVE Terms of Use, modified 2025-04-23
- GitHub Advisory Database: [GHSA-p9p4-97g9-wcrh](https://github.com/advisories/GHSA-p9p4-97g9-wcrh), CC-BY-4.0, modified 2025-11-03
- NVD: [CVE-2022-31023](https://nvd.nist.gov/vuln/detail/CVE-2022-31023), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-31023 · Whole record: https://cve.day/CVE-2022-31023.json · Rebuilt by cve.day 2026-11-25T22:58:12.100Z
