# GHSA-j68w-pg49-f6vx: Symfony XML decoding attack vector through external entities

> An attacker can exploit XML external entity injection in Symfony's XMLEncoder to read arbitrary files from the server filesystem.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not stated
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 30 May 2024

## What is GHSA-j68w-pg49-f6vx?

GHSA-j68w-pg49-f6vx is a vulnerability in symfony/serializer, published on 30 May 2024. It can be exploited over the network, with no action from the victim.

### Official description

The XMLEncoder component of Symfony 2.0.x fails to disable external entities when parsing XML. In the Symfony2 framework the XML class may be used to deserialize objects or as part of a client/server API. By using external entities it is possible to include arbitrary files from the file system.

## Which versions are affected by GHSA-j68w-pg49-f6vx?

2 open source packages ship an affected version, including symfony/serializer.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `symfony/serializer` | Packagist | From 2.0.0 | 2.0.11 |
| `symfony/serializer` | Packagist | From 2.0.0 | 2.0.11 |

## How do I fix GHSA-j68w-pg49-f6vx?

Upgrade symfony/serializer to 2.0.11 or later.

## Is GHSA-j68w-pg49-f6vx being exploited?

There is no known exploitation of GHSA-j68w-pg49-f6vx in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-j68w-pg49-f6vx and fix it if it is affected.

What it is: GHSA-j68w-pg49-f6vx is a vulnerability in symfony/serializer, published on 30 May 2024. It can be exploited over the network, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-j68w-pg49-f6vx in the wild and no public exploit code.

Affected packages and fixed versions:
- symfony/serializer (Packagist): affected from 2.0.0; fixed in 2.0.11
- symfony/serializer (Packagist): affected from 2.0.0; fixed in 2.0.11

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-j68w-pg49-f6vx/ (Markdown: https://insights.sbomify.com/GHSA-j68w-pg49-f6vx/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-j68w-pg49-f6vx

---
From sbomify Insights: https://insights.sbomify.com/GHSA-j68w-pg49-f6vx/
Summaries are generated and may contain mistakes; the official description above is the record.
