CVE-2022-31023
CVE-2022-31023 is a medium-severity vulnerability in Lightbend Play Framework with a CVSS 3.x base score of 5.9. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-209.
Key facts
- Severity: Medium (CVSS 3.x base score 5.9)
- CVSS v2: 5.0
- EPSS exploit prediction: 1% (65th percentile)
- Actively exploited: Not listed in CISA KEV
- Weakness: CWE-209
- Affected product: Lightbend Play Framework
- Published:
- Last modified:
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.
Frequently asked questions
- What is CVE-2022-31023?
- 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.
- How severe is CVE-2022-31023?
- CVE-2022-31023 has a CVSS 3.x base score of 5.9, rated medium severity. It is exploitable over network with high attack complexity, requires no privileges and no user interaction. Impact on confidentiality is high, integrity none, and availability none.
- Is CVE-2022-31023 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 1% (65th percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2022-31023?
- CVE-2022-31023 affects Lightbend Play Framework. See the affected-products list for the exact vulnerable versions.
- How do I fix CVE-2022-31023?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround.
- When was CVE-2022-31023 published?
- CVE-2022-31023 was published on 2022-06-02 and last updated on 2026-06-17.
References
- https://github.com/playframework/playframework/pull/11305
- https://github.com/playframework/playframework/releases/tag/2.8.16
- https://github.com/playframework/playframework/security/advisories/GHSA-p9p4-97g9-wcrh
Affected products (1)
- cpe:2.3:a:lightbend:play_framework:*:*:*:*:*:*:*:*
More vulnerabilities in Lightbend Play Framework
- CVE-2014-3630 — Critical (CVSS 9.8): XML external entity (XXE) vulnerability in the Java XML processing functionality in Play before 2.2.6 and 2.3.x before…
- CVE-2022-31018 — High (CVSS 7.5): Play Framework is a web framework for Java and Scala. A denial of service vulnerability has been discovered in verions…
- CVE-2020-27196 — High (CVSS 7.5): An issue was discovered in PlayJava in Play Framework 2.6.0 through 2.8.2. The body parsing of HTTP requests eagerly…
- CVE-2020-26883 — High (CVSS 7.5): In Play Framework 2.6.0 through 2.8.2, stack consumption can occur because of unbounded recursion during parsing of…
- CVE-2020-26882 — High (CVSS 7.5): In Play Framework 2.6.0 through 2.8.2, data amplification can occur when an application accepts multipart/form-data…
- CVE-2019-17598 — High (CVSS 7.5): An issue was discovered in Lightbend Play Framework 2.5.x through 2.6.23. When configured to make requests using an…
All CVEs affecting Lightbend Play Framework →
Other CWE-209 (Generation of Error Message Containing Sensitive Information) vulnerabilities
- CVE-2025-62168 — Critical (CVSS 10.0): Squid is a caching proxy for the Web. In Squid versions prior to 7.2, a failure to redact HTTP authentication…
- CVE-2025-68110 — Critical (CVSS 9.9): ChurchCRM is an open-source church management system. Versions prior to 6.5.3 may disclose database information in an…
- CVE-2025-46658 — Critical (CVSS 9.8): An issue was discovered in ExonautWeb in 4C Strategies Exonaut 21.6. There are verbose error messages.
- CVE-2024-28285 — Critical (CVSS 9.8): A Fault Injection vulnerability in the SymmetricDecrypt function in cryptopp/elgamal.h of Cryptopp Crypto++ 8.9, allows…
- CVE-2023-40767 — Critical (CVSS 9.8): User enumeration is found in in PHPJabbers Make an Offer Widget v1.0. This issue occurs during password recovery, where…
- CVE-2023-40766 — Critical (CVSS 9.8): User enumeration is found in in PHPJabbers Ticket Support Script v3.2. This issue occurs during password recovery,…
Browse all CWE-209 (Generation of Error Message Containing Sensitive Information) vulnerabilities →