CVE-2013-1348: Symphony Vulnerable to PHP Code Injection via YAML Parsing

symfony/symfony Updated 02 Oct 2025

Summary

17/05/2022
Yes i
High
Not published

CVE-2013-1348: Symphony Vulnerable to PHP Code Injection via YAML Parsing. Affects symfony/symfony versions >= 2.0.0, < 2.0.22. Fixed in 2.0.22. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Symphony is a popular PHP framework used for developing web applications. It provides a set of reusable components and tools that simplify the development process. One of the components used in Symphony is the YAML parser, which allows developers to parse YAML files and convert them into PHP objects. However, a vulnerability in the YAML parser in Symphony versions 2.0.x before 2.0.22 allows remote attackers to execute arbitrary PHP code. This vulnerability is different from CVE-2013-1397.

Vulnerability Detail

The vulnerability in Symphony arises from the Yaml::parse function, which is used to parse YAML files. Attackers can exploit this vulnerability by providing a specially crafted YAML file that contains malicious PHP code. When the YAML file is parsed, the PHP code is executed, leading to arbitrary code execution on the server. This can result in various consequences, including unauthorized access, data leakage, and server compromise.

How To Fix

Minimum fixed version

2.0.22

This is the first release that contains the fix.

composer require symfony/symfony:2.0.22

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If upgrading Symphony is not immediately feasible, a temporary workaround is to disable the use of the YAML parser in the affected application. This can be done by modifying the application code to use an alternative parser or by implementing input validation and sanitization to prevent the execution of arbitrary PHP code.

Conclusion

The vulnerability in Symphony's YAML parsing functionality can lead to the execution of arbitrary PHP code on the server. To mitigate this risk, it is crucial to upgrade Symphony to version 2.0.22 or later. Additionally, implementing input validation and sanitization can provide temporary protection. For further assistance and support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for symfony/symfony →

Share this vulnerability

FAQ

This vulnerability allows remote attackers to execute arbitrary PHP code on the server. The impact can range from unauthorized access to sensitive data to complete server compromise.

No, only Symphony versions 2.0.x before 2.0.22 are vulnerable to this specific issue. It is recommended to upgrade to the fixed version to mitigate the vulnerability.

Yes, remote attackers can exploit this vulnerability by sending a specially crafted YAML file to the affected server.

While specific exploits may not be publicly available, the existence of this vulnerability increases the risk of successful attacks. It is important to apply the recommended fixes to mitigate the risk.

There is no specific evidence of active exploitation of this vulnerability at the moment. However, it is always recommended to apply security patches and updates as soon as they become available.

Related vulnerabilities

Recent vulnerabilities recorded for symfony/symfony.

How To Fix

Minimum fixed version

2.0.22

This is the first release that contains the fix.

composer require symfony/symfony:2.0.22

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback