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


0.0
medium

Snyk CVSS

    Attack Complexity High
    Confidentiality High

    Threat Intelligence

    EPSS 0.17% (53rd percentile)
Expand this section
NVD
7.5 high

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 ID SNYK-JAVA-COMTYPESAFEPLAY-2855275
  • published 3 Jun 2022
  • disclosed 3 Jun 2022
  • credit Billy Autrey (@BillyAutrey), Greg Methvin (@gmethvin), Ilya Brin (@dontgitit)

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