CVE-2013-1348: Symfony/symfony Symphony Vulnerable To PHP Code Vulnerability

HIGH
Advisory Identifier: GHSA-2r5h-6r7v-5m7c
CWE-94
Published
Advisory Summary

CVE-2013-1348 is a HIGH symphony vulnerable to php code vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Symfony/symfony libraries in the Packagist ecosystem. The issue involves symphony vulnerable to php code injection via yaml parsing. Remediation is available by upgrading affected packages to version 2.0.22.

CVE-2013-1348 at a Glance

CVE Identifier CVE-2013-1348
GHSA Identifier GHSA-2r5h-6r7v-5m7c
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product Symfony/symfony
Package Ecosystem Packagist
Published Date
Last Updated

How to Fix CVE-2013-1348

To remediate this vulnerability, upgrade all affected Symfony/symfony 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/symfony fixed: 2.0.22
Upgrade symfony/symfony to 2.0.22
symfony/yaml fixed: 2.0.22
Upgrade symfony/yaml to 2.0.22
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/symfony

How to Check if You Are Affected

To determine whether your application is affected by CVE-2013-1348, inspect your project dependencies for Symfony/symfony:

inspect dependencies for symfony/symfony

Analyze the terminal output to locate any version of Symfony/symfony in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.22), 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-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Symfony/symfony, 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

The `Yaml::parse` function in Symfony 2.0.x before 2.0.22 remote attackers to execute arbitrary PHP code via a PHP file, a different vulnerability than CVE-2013-1397.

CVE-2013-1348 Affected Symfony/symfony Versions

2 component(s)
Fixed Versions:
2.0.22
Product / Package Ecosystem Affected Versions Fixed Version
symfony/symfony
Packagist
≥ 2.0.0
< 2.0.22
2.0.22
symfony/yaml
Packagist
≥ 2.0.0
< 2.0.22
2.0.22

References

Frequently Asked Questions

What is CVE-2013-1348?
CVE-2013-1348 is a security vulnerability in Symfony/symfony involving Symphony Vulnerable to PHP Code Injection via YAML Parsing under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which Symfony/symfony versions are affected?
Affected versions include releases prior to 2.0.22 across affected packages: symfony/symfony, symfony/yaml.
What version fixes CVE-2013-1348?
Upgrading to 2.0.22 (or the latest patched release for your respective branch) resolves the vulnerability.
Is symfony/symfony affected?
Yes, symfony/symfony is affected in releases prior to 2.0.22. Upgrade your dependency to 2.0.22 or later.
Is symfony/yaml affected?
Yes, symfony/yaml is affected in releases prior to 2.0.22. Upgrade your dependency to 2.0.22 or later.
What CWE is associated with CVE-2013-1348?
CVE-2013-1348 is classified under CWE-94: Improper Control of Generation of Code ('Code Injection') (The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.).
How can I check Packagist dependencies for CVE-2013-1348?
Run the dependency tree command: 'inspect dependencies for symfony/symfony'. 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-2r5h-6r7v-5m7c",
  "modified" : "2024-04-25T22:09:29Z",
  "published" : "2022-05-17T01:36:50Z",
  "aliases" : [ "CVE-2013-1348" ],
  "summary" : "Symphony Vulnerable to PHP Code Injection via YAML Parsing",
  "details" : "The `Yaml::parse` function in Symfony 2.0.x before 2.0.22 remote attackers to execute arbitrary PHP code via a PHP file, a different vulnerability than CVE-2013-1397.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/symfony"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0"
      }, {
        "fixed" : "2.0.22"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/yaml"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0"
      }, {
        "fixed" : "2.0.22"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2013-1348"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/symfony/symfony/commit/ac756bf39e646b4e130fad058d10a0228dbd9779"
  }, {
    "type" : "WEB",
    "url" : "https://exchange.xforce.ibmcloud.com/vulnerabilities/81550"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2013-1348.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/yaml/CVE-2013-1348.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/symfony/symfony"
  }, {
    "type" : "WEB",
    "url" : "https://symfony.com/blog/security-release-symfony-2-0-22-and-2-1-7-released"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20150612022223/http://www.securityfocus.com/bid/57574"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-94" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-04-25T22:09:29Z",
    "nvd_published_at" : "2014-06-02T15:55:00Z"
  }
}