CVE-2019-10913: Symfony/http foundation Cross-Site Scripting Vulnerability

CRITICAL
Advisory Identifier: GHSA-x92h-wmg2-6hp7
CVSS 9.8
CWE-89 CWE-79
Published
Advisory Summary

CVE-2019-10913 is a CRITICAL (CVSS 9.8) cross-site scripting vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting Symfony/http foundation libraries in the Packagist ecosystem. The issue involves invalid http method overrides allow possible xss or other attacks in symfony. Remediation is available by upgrading affected packages to version 2.7.51, 2.8.50, 3.4.26, 4.1.12, 4.2.7.

CVE-2019-10913 at a Glance

CVE Identifier CVE-2019-10913
GHSA Identifier GHSA-x92h-wmg2-6hp7
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Affected Product Symfony/http foundation
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 9.8

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

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

How to Fix CVE-2019-10913

To remediate this vulnerability, upgrade all affected Symfony/http foundation 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/http-foundation fixed: 2.7.51
Upgrade symfony/http-foundation to 2.7.51
symfony/http-foundation fixed: 2.8.50
Upgrade symfony/http-foundation to 2.8.50
symfony/http-foundation fixed: 3.4.26
Upgrade symfony/http-foundation to 3.4.26
symfony/http-foundation fixed: 4.1.12
Upgrade symfony/http-foundation to 4.1.12
symfony/http-foundation fixed: 4.2.7
Upgrade symfony/http-foundation to 4.2.7
symfony/symfony fixed: 2.7.51
Upgrade symfony/symfony to 2.7.51
symfony/symfony fixed: 2.8.50
Upgrade symfony/symfony to 2.8.50
symfony/symfony fixed: 3.4.26
Upgrade symfony/symfony to 3.4.26
symfony/symfony fixed: 4.1.12
Upgrade symfony/symfony to 4.1.12
symfony/symfony fixed: 4.2.7
Upgrade symfony/symfony to 4.2.7
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/http-foundation

How to Check if You Are Affected

To determine whether your application is affected by CVE-2019-10913, inspect your project dependencies for Symfony/http foundation:

inspect dependencies for symfony/http-foundation

Analyze the terminal output to locate any version of Symfony/http foundation in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.7.51), 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-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where the product constructs all or part of an sql command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended sql command when it is sent to a downstream component. without sufficient removal or quoting of sql syntax in user-controllable inputs, the generated sql query can cause those inputs to be interpreted as sql instead of ordinary user data. In Symfony/http foundation, 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

In Symfony before 2.7.51, 2.8.x before 2.8.50, 3.x before 3.4.26, 4.x before 4.1.12, and 4.2.x before 4.2.7, HTTP Methods provided as verbs or using the override header may be treated as trusted input, but they are not validated, possibly causing SQL injection or XSS. This is related to symfony/http-foundation.

CVE-2019-10913 Affected Symfony/http foundation Versions

10 component(s)
Fixed Versions:
2.7.512.8.503.4.264.1.124.2.7
Product / Package Ecosystem Affected Versions Fixed Version
symfony/http-foundation
Packagist
≥ 2.7.0
< 2.7.51
2.7.51
symfony/http-foundation
Packagist
≥ 2.8.0
< 2.8.50
2.8.50
symfony/http-foundation
Packagist
≥ 3.0.0
< 3.4.26
3.4.26
symfony/http-foundation
Packagist
≥ 4.0.0
< 4.1.12
4.1.12
symfony/http-foundation
Packagist
≥ 4.2.0
< 4.2.7
4.2.7
symfony/symfony
Packagist
≥ 2.7.0
< 2.7.51
2.7.51
symfony/symfony
Packagist
≥ 2.8.0
< 2.8.50
2.8.50
symfony/symfony
Packagist
≥ 3.0.0
< 3.4.26
3.4.26
symfony/symfony
Packagist
≥ 4.0.0
< 4.1.12
4.1.12
symfony/symfony
Packagist
≥ 4.2.0
< 4.2.7
4.2.7

References

Frequently Asked Questions

What is CVE-2019-10913?
CVE-2019-10913 is a security vulnerability in Symfony/http foundation involving Invalid HTTP method overrides allow possible XSS or other attacks in Symfony under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').
Which Symfony/http foundation versions are affected?
Affected versions include releases prior to 2.7.51, 2.8.50, 3.4.26, 4.1.12, 4.2.7 across affected packages: symfony/http-foundation, symfony/symfony.
What version fixes CVE-2019-10913?
Upgrading to 2.7.51, 2.8.50, 3.4.26, 4.1.12, 4.2.7 (or the latest patched release for your respective branch) resolves the vulnerability.
Is symfony/http-foundation affected?
Yes, symfony/http-foundation is affected in releases prior to 2.7.51, 2.8.50, 3.4.26, 4.1.12, 4.2.7. Upgrade your dependency to 2.7.51, 2.8.50, 3.4.26, 4.1.12, 4.2.7 or later.
Is symfony/symfony affected?
Yes, symfony/symfony is affected in releases prior to 2.7.51, 2.8.50, 3.4.26, 4.1.12, 4.2.7. Upgrade your dependency to 2.7.51, 2.8.50, 3.4.26, 4.1.12, 4.2.7 or later.
What is the CVSS score of CVE-2019-10913?
CVE-2019-10913 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2019-10913?
CVE-2019-10913 is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') (The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.).
How can I check Packagist dependencies for CVE-2019-10913?
Run the dependency tree command: 'inspect dependencies for symfony/http-foundation'. 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-x92h-wmg2-6hp7",
  "modified" : "2021-08-19T15:18:27Z",
  "published" : "2019-12-02T18:10:24Z",
  "aliases" : [ "CVE-2019-10913" ],
  "summary" : "Invalid HTTP method overrides allow possible XSS or other attacks in Symfony",
  "details" : "In Symfony before 2.7.51, 2.8.x before 2.8.50, 3.x before 3.4.26, 4.x before 4.1.12, and 4.2.x before 4.2.7, HTTP Methods provided as verbs or using the override header may be treated as trusted input, but they are not validated, possibly causing SQL injection or XSS. This is related to symfony/http-foundation.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/http-foundation"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.7.0"
      }, {
        "fixed" : "2.7.51"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/http-foundation"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.8.0"
      }, {
        "fixed" : "2.8.50"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/http-foundation"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.4.26"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/http-foundation"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.0"
      }, {
        "fixed" : "4.1.12"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/http-foundation"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.2.0"
      }, {
        "fixed" : "4.2.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/symfony"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.7.0"
      }, {
        "fixed" : "2.7.51"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/symfony"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.8.0"
      }, {
        "fixed" : "2.8.50"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/symfony"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.4.26"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/symfony"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.0"
      }, {
        "fixed" : "4.1.12"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/symfony"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.2.0"
      }, {
        "fixed" : "4.2.7"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-10913"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/symfony/symfony/commit/944e60f083c3bffbc6a0b5112db127a10a66a8ec"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/http-foundation/CVE-2019-10913.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2019-10913.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://symfony.com/blog/cve-2019-10913-reject-invalid-http-method-overrides"
  }, {
    "type" : "WEB",
    "url" : "https://symfony.com/cve-2019-10913"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79", "CWE-89" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2019-12-01T19:49:35Z",
    "nvd_published_at" : null
  }
}