{"answers":{"affected":"4 open source packages ship an affected version, including com.typesafe.play:play_2.12 and com.typesafe.play:play_2.13. It affects 1 product.","exploited":"There is no known exploitation of CVE-2022-31023 in the wild and no public exploit code.","fix":"Upgrade com.typesafe.play:play_2.12 to 2.8.16 or later.","what":"CVE-2022-31023 is a medium-severity vulnerability in playframework, published on 2 Jun 2022. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2022-31023 and fix it if it is affected.\n\nWhat it is: CVE-2022-31023 is a medium-severity vulnerability in playframework, published on 2 Jun 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2022-31023 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- com.typesafe.play:play_2.12 (Maven): affected all versions; fixed in 2.8.16\n- com.typesafe.play:play_2.12 (Maven): affected all versions; fixed in 2.8.16\n- com.typesafe.play:play_2.13 (Maven): affected all versions; fixed in 2.8.16\n- com.typesafe.play:play_2.13 (Maven): affected all versions; fixed in 2.8.16\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2022-31023/ (Markdown: https://insights.sbomify.com/CVE-2022-31023/index.md)","id":"CVE-2022-31023","markdown":"https://insights.sbomify.com/CVE-2022-31023/index.md","name":"CVE-2022-31023","record":{"aliases":["GHSA-p9p4-97g9-wcrh"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read"],"network_reachable":"yes","non_default_config":true,"product_category":"Play Framework","requires_auth":"none","summary":"Attackers can view sensitive stack traces in production if developers inadvertently use the static DefaultHttpErrorHandler object instead of the injected instance.","user_interaction":"not_required","vuln_class":"information_disclosure"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"play_framework","vendor":"lightbend"}],"cvss":{"score":5.9,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-209","name":"Generation of Error Message Containing Sensitive Information"}],"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.","ecosystems":["Maven"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Dev error stack trace leaking into prod in Play Framework","id":"CVE-2022-31023","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Maven","product":null,"products":[],"type":"information_disclosure","year":"2022"},"n_packages":4,"n_references":3,"next":{"headline":"Federated editing allows iframing remote servers by default in richdocuments","id":"CVE-2022-31024"},"packages":[{"ecosystem":"Maven","fixed":["2.8.16"],"introduced":["0"],"last_affected":[],"package":"com.typesafe.play:play_2.12","purl":null,"source":"GHSA-p9p4-97g9-wcrh"},{"ecosystem":"Maven","fixed":["2.8.16"],"introduced":["0"],"last_affected":[],"package":"com.typesafe.play:play_2.12","purl":"pkg:maven/com.typesafe.play/play_2.12","source":"GHSA-p9p4-97g9-wcrh"},{"ecosystem":"Maven","fixed":["2.8.16"],"introduced":["0"],"last_affected":[],"package":"com.typesafe.play:play_2.13","purl":null,"source":"GHSA-p9p4-97g9-wcrh"},{"ecosystem":"Maven","fixed":["2.8.16"],"introduced":["0"],"last_affected":[],"package":"com.typesafe.play:play_2.13","purl":"pkg:maven/com.typesafe.play/play_2.13","source":"GHSA-p9p4-97g9-wcrh"}],"prev":{"headline":"Missing Role Based Access Control for the REST handlers in bleve/http package","id":"CVE-2022-31022"},"products":["playframework"],"published":"2022-06-02","related":[{"cvss_score":9.8,"headline":"XML external entity in n/a","id":"CVE-2014-3630","kev_date_added":null,"published":"2017-12-29"},{"cvss_score":7.5,"headline":"Denial of service binding form from JSON in Play Framework","id":"CVE-2022-31018","kev_date_added":null,"published":"2022-06-02"},{"cvss_score":7.5,"headline":"Data Amplification in Play Framework","id":"CVE-2020-26882","kev_date_added":null,"published":"2020-11-06"},{"cvss_score":7.5,"headline":"Uncontrolled Recursion in Play Framework","id":"CVE-2020-26883","kev_date_added":null,"published":"2020-11-06"},{"cvss_score":7.5,"headline":"Out-of-bounds Write in Play Framework","id":"CVE-2020-27196","kev_date_added":null,"published":"2020-11-06"},{"cvss_score":7.5,"headline":"Play Framework Inadequate Encryption Strength vulnerability","id":"CVE-2019-17598","kev_date_added":null,"published":"2019-11-05"},{"cvss_score":7.5,"headline":"Play Framework's Assets controller vulnerable to directory traversal","id":"CVE-2018-13864","kev_date_added":null,"published":"2018-07-17"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-04-23","vendors":["playframework"]},"summary":"Attackers can view sensitive stack traces in production if developers inadvertently use the static DefaultHttpErrorHandler object instead of the injected instance.","url":"https://insights.sbomify.com/CVE-2022-31023/"}