CVE-2020-5274: Symfony/error handler Exceptions Displayed Vulnerability

MODERATE
Advisory Identifier: GHSA-m884-279h-32v2
CVSS 4.6
CWE-209
Published
Advisory Summary

CVE-2020-5274 is a MODERATE (CVSS 4.6) exceptions displayed vulnerability (CWE-209: Generation of Error Message Containing Sensitive Information) affecting Symfony/error handler libraries in the Packagist ecosystem. The issue involves exceptions displayed in non-debug configurations in symfony. Remediation is available by upgrading affected packages to version 4.4.4, 5.0.4.

CVE-2020-5274 at a Glance

CVE Identifier CVE-2020-5274
GHSA Identifier GHSA-m884-279h-32v2
Severity MODERATE
CVSS v3.1 Base Score 4.6
CWE Classification CWE-209: Generation of Error Message Containing Sensitive Information
Affected Product Symfony/error handler
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 4.6

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2020-5274

To remediate this vulnerability, upgrade all affected Symfony/error handler dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

symfony/error-handler fixed: 4.4.4
Upgrade symfony/error-handler to 4.4.4
symfony/error-handler fixed: 5.0.4
Upgrade symfony/error-handler to 5.0.4
symfony/symfony fixed: 4.4.4
Upgrade symfony/symfony to 4.4.4
symfony/symfony fixed: 5.0.4
Upgrade symfony/symfony to 5.0.4
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for symfony/error-handler

How to Check if You Are Affected

To determine whether your application is affected by CVE-2020-5274, inspect your project dependencies for Symfony/error handler:

inspect dependencies for symfony/error-handler

Analyze the terminal output to locate any version of Symfony/error handler in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.4.4), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-209: Generation of Error Message Containing Sensitive Information, where the product generates an error message that includes sensitive information about its environment, users, or associated data. In Symfony/error handler, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Description ----------- When `ErrorHandler` renders an exception HTML page, it uses un-escaped properties from the related Exception class to render the stacktrace. The security issue comes from the fact that the stacktraces were also displayed in non-`debug` environments. Resolution ---------- The `ErrorHandler` class now escapes all properties coming from the related Exception, and the stacktrace is not displayed anymore in non-`debug` environments. The patches for this issue are available [here](https://github.com/symfony/symfony/commit/cf80224589ac05402d4f72f5ddf80900ec94d5ad) and [here](https://github.com/symfony/symfony/commit/629d21b800a15dc649fb0ae9ed7cd9211e7e45db) for branch 4.4. Credits ------- I would like to thank Luka Sikic for reporting & Yonel Ceruto and Jérémy Derussé for fixing the issue.

CVE-2020-5274 Affected Symfony/error handler Versions

4 component(s)
Fixed Versions:
4.4.45.0.4
Product / Package Ecosystem Affected Versions Fixed Version
symfony/error-handler
Packagist
≥ 4.4.0
< 4.4.4
4.4.4
symfony/error-handler
Packagist
≥ 5.0.0
< 5.0.4
5.0.4
symfony/symfony
Packagist
≥ 4.4.0
< 4.4.4
4.4.4
symfony/symfony
Packagist
≥ 5.0.0
< 5.0.4
5.0.4

References

Frequently Asked Questions

What is CVE-2020-5274?
CVE-2020-5274 is a security vulnerability in Symfony/error handler involving Exceptions displayed in non-debug configurations in Symfony under CWE-209: Generation of Error Message Containing Sensitive Information.
Which Symfony/error handler versions are affected?
Affected versions include releases prior to 4.4.4, 5.0.4 across affected packages: symfony/error-handler, symfony/symfony.
What version fixes CVE-2020-5274?
Upgrading to 4.4.4, 5.0.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is symfony/error-handler affected?
Yes, symfony/error-handler is affected in releases prior to 4.4.4, 5.0.4. Upgrade your dependency to 4.4.4, 5.0.4 or later.
Is symfony/symfony affected?
Yes, symfony/symfony is affected in releases prior to 4.4.4, 5.0.4. Upgrade your dependency to 4.4.4, 5.0.4 or later.
What is the CVSS score of CVE-2020-5274?
CVE-2020-5274 has a CVSS v3.1 base score of 4.6 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N.
What CWE is associated with CVE-2020-5274?
CVE-2020-5274 is classified under CWE-209: Generation of Error Message Containing Sensitive Information (The product generates an error message that includes sensitive information about its environment, users, or associated data.).
How can I check Packagist dependencies for CVE-2020-5274?
Run the dependency tree command: 'inspect dependencies for symfony/error-handler'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-m884-279h-32v2",
  "modified" : "2024-02-06T13:30:38Z",
  "published" : "2020-03-30T20:09:31Z",
  "aliases" : [ "CVE-2020-5274" ],
  "summary" : "Exceptions displayed in non-debug configurations in Symfony",
  "details" : "Description\n-----------\n\nWhen `ErrorHandler` renders an exception HTML page, it uses un-escaped properties from the related Exception class to render the stacktrace. The security issue comes from the fact that the stacktraces were also displayed in non-`debug` environments.\n\nResolution\n----------\n\nThe `ErrorHandler` class now escapes all properties coming from the related Exception, and the stacktrace is not displayed anymore in non-`debug` environments.\n\nThe patches for this issue are available [here](https://github.com/symfony/symfony/commit/cf80224589ac05402d4f72f5ddf80900ec94d5ad) and [here](https://github.com/symfony/symfony/commit/629d21b800a15dc649fb0ae9ed7cd9211e7e45db) for branch 4.4.\n\nCredits\n-------\n\nI would like to thank Luka Sikic for reporting & Yonel Ceruto and Jérémy Derussé for fixing the issue.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/error-handler"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.4.0"
      }, {
        "fixed" : "4.4.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/error-handler"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0"
      }, {
        "fixed" : "5.0.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/symfony"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.4.0"
      }, {
        "fixed" : "4.4.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/symfony"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0"
      }, {
        "fixed" : "5.0.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/symfony/symfony/security/advisories/GHSA-m884-279h-32v2"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-5274"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/symfony/symfony/commit/629d21b800a15dc649fb0ae9ed7cd9211e7e45db"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/symfony/symfony/commit/cf80224589ac05402d4f72f5ddf80900ec94d5ad"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/error-handler/CVE-2020-5274.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2020-5274.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://symfony.com/cve-2020-5274"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-209" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-03-30T19:36:11Z",
    "nvd_published_at" : null
  }
}