Information Exposure Affecting com.typesafe.play:play_2.12 package, versions [,2.8.16)


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.41% (61st percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JAVA-COMTYPESAFEPLAY-2855275
  • published3 Jun 2022
  • disclosed3 Jun 2022
  • creditBilly Autrey (@BillyAutrey), Greg Methvin (@gmethvin), Ilya Brin (@dontgitit)

Introduced: 3 Jun 2022

CVE-2022-31023  (opens in a new tab)
CWE-200  (opens in a new tab)
CWE-209  (opens in a new tab)

How to fix?

Upgrade com.typesafe.play:play_2.12 to version 2.8.16 or higher.

Overview

com.typesafe.play:play_2.12 is a library for building scalable web applications with Java and Scala.

Affected versions of this package are vulnerable to Information Exposure due to the 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. Its Scala API Play also provides a static object DefaultHttpErrorHandler 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 displayed 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.

Workaround

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.

References

CVSS Base Scores

version 3.1