SecurityContext

CVE-2022-31023: Play Framework - Information Disclosure

  • Cve: CVE-2022-31023
  • Name: Play Framework - Information Disclosure
  • 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.
  • Impact: Attackers may access sensitive information through verbose error messages, leading to potential data leaks and security breaches.
  • Remediation: Upgrade to version 2.8.16 or later and ensure proper configuration of `HttpErrorHandler` to avoid using static `DefaultHttpErrorHandler` in production.
  • Vulnerability type: misconfiguration
  • Vulnerability impact: information_disclosure
  • Requirement type: none
  • Labels source: projectdiscovery
  • Severity: high
  • Cvss score: 7.5
  • Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
  • Epss score: 0.01349
  • Epss percentile: 0.72214
  • Assignee: [email protected]
  • Published at: 2022-06-02T18:15:09Z
  • Age in days: 1636
  • Modified at: 2026-06-17T04:44:37Z
  • Patch available: yes
  • References total: 3
  • Products total: 1
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2022-31023
  • Nvd status: modified
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
  • Not known: requirements, hackerone

Cwe

IdName
CWE-209Generation of Error Message Containing Sensitive Information

References

Same in every row:

  • Source: nvd
UrlTags
https://github.com/playframework/playframework/pull/11305Issue Tracking, Patch, Third Party Advisory
https://github.com/playframework/playframework/security/advisories/GHSA-p9p4-97g9-wcrhMitigation, Third Party Advisory
https://github.com/playframework/playframework/releases/tag/2.8.16Release Notes, Third Party Advisory

Products

ProductAffectedPlatform boundSourcesUrl
lightbend:play_framework< 2.8.16nonvd/v1/products/lightbend/play_framework

Projects

RepositoryLink kindsIndexedUrl
playframework/playframeworkpackage, pull, releases, security_advisoryyes/v1/repositories/playframework/playframework

Index

  • Repositories: 3
  • Repositories high signal: 1
  • Packages: 1

Exploitation

  • Remote: yes
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, authentication required
  • Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts