CVE-2013-1397: Symfony/symfony Symfony Arbitrary PHP Code Execution Vulnerability
HIGHCVE-2013-1397 is a HIGH symfony arbitrary php code execution vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Symfony/symfony libraries in the Packagist ecosystem. The issue involves symfony arbitrary php code execution. Remediation is available by upgrading affected packages to version 2.2.0-BETA2, 2.0.22, 2.1.7.
CVE-2013-1397 at a Glance
How to Fix CVE-2013-1397
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.
Upgrade symfony/symfony to 2.2.0-BETA2
Upgrade symfony/symfony to 2.0.22
Upgrade symfony/symfony to 2.1.7
Upgrade symfony/yaml to 2.0.22
Upgrade symfony/yaml to 2.1.7
Upgrade symfony/yaml to 2.2.0-BETA2
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-1397, 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.2.0-BETA2), 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
CVE-2013-1397 Affected Symfony/symfony Versions
6 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
symfony/symfony
|
Packagist |
≥ 2.2.0-BETA1
< 2.2.0-BETA2
|
2.2.0-BETA2
|
|
symfony/symfony
|
Packagist |
≥ 2.0.0
< 2.0.22
|
2.0.22
|
|
symfony/symfony
|
Packagist |
≥ 2.1.0
< 2.1.7
|
2.1.7
|
|
symfony/yaml
|
Packagist |
≥ 2.0.0
< 2.0.22
|
2.0.22
|
|
symfony/yaml
|
Packagist |
≥ 2.1.0
< 2.1.7
|
2.1.7
|
|
symfony/yaml
|
Packagist |
≥ 2.2.0-BETA1
< 2.2.0-BETA2
|
2.2.0-BETA2
|
References
Frequently Asked Questions
What is CVE-2013-1397?
Which Symfony/symfony versions are affected?
What version fixes CVE-2013-1397?
Is symfony/symfony affected?
Is symfony/yaml affected?
What CWE is associated with CVE-2013-1397?
How can I check Packagist dependencies for CVE-2013-1397?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-7w53-hfpw-rg3g",
"modified" : "2025-04-14T21:43:11Z",
"published" : "2022-05-17T01:36:49Z",
"aliases" : [ "CVE-2013-1397" ],
"summary" : "Symfony Arbitrary PHP code Execution",
"details" : "Symfony 2.0.x before 2.0.22, 2.1.x before 2.1.7, and 2.2.x remote attackers to execute arbitrary PHP code via a serialized PHP object to the (1) Yaml::parse or (2) Yaml\\Parser::parse function, a different vulnerability than CVE-2013-1348.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.2.0-BETA1"
}, {
"fixed" : "2.2.0-BETA2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.0.22"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.1.0"
}, {
"fixed" : "2.1.7"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/yaml"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.0.22"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/yaml"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.1.0"
}, {
"fixed" : "2.1.7"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/yaml"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.2.0-BETA1"
}, {
"fixed" : "2.2.0-BETA2"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2013-1397"
}, {
"type" : "WEB",
"url" : "https://github.com/symfony/symfony/commit/ba6e3159c0eeb3b6e21db32fce8fa2535cb3aa77"
}, {
"type" : "WEB",
"url" : "https://exchange.xforce.ibmcloud.com/vulnerabilities/81551"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2013-1397.yaml"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/yaml/CVE-2013-1397.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" : "http://symfony.com/blog/security-release-symfony-2-0-22-and-2-1-7-released"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-94" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2023-08-28T23:40:22Z",
"nvd_published_at" : "2014-06-02T15:55:00Z"
}
}