Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. easycorp/easyadmin-bundle
  4. ›
  5. GHSA-2wwr-9x6f-88gp

GHSA-2wwr-9x6f-88gp: EasyAdminBundle has path traversal and reflected XSS in Flag and Icon Twig components

July 1, 2026

EasyAdminBundle ships two public Twig components — <twig:ea:Flag countryCode="..."> and <twig:ea:Icon name="..."> — that load SVG files from disk using a path built directly from a public component property, and then render the resulting markup with the Twig |raw filter.

When an application binds either of those properties to data that is influenced by an end user, the lack of validation on the property value leads to two distinct issues:

  • Arbitrary .svg file disclosure (both components) — the property value is concatenated into a filesystem path without normalizing or constraining it, so .. segments are preserved and resolved by PHP. Any file on the server whose absolute path ends in .svg (for example, user-uploaded SVG icons stored elsewhere on the host) can be read and embedded into the rendered page.
  • Reflected XSS in the admin UI (Flag component only) — when the requested flag file does not exist, the Flag component falls back to a hard-coded SVG string that interpolates the raw countryCode value twice, and the parent template renders that string with |raw. An attacker who controls countryCode can therefore inject arbitrary HTML/JavaScript that will execute inside the authenticated admin context that rendered the component.

The first-party usage shipped by EasyAdminBundle itself is not affected: the bundle only passes ISO 3166 alpha-2 codes validated through Symfony\Component\Intl\Countries to the Flag component, and only hard-coded internal:.. names or values previously set in PHP via MenuItem::setIcon() to the Icon component. The vulnerability is reachable only in third-party templates that pass attacker-controlled data into these properties.

References

  • github.com/EasyCorp/EasyAdminBundle/security/advisories/GHSA-2wwr-9x6f-88gp
  • github.com/advisories/GHSA-2wwr-9x6f-88gp

Code Behaviors & Features

Detect and mitigate GHSA-2wwr-9x6f-88gp with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 4.0.0 before 4.29.10, all versions starting from 5.0.0 before 5.0.10

Fixed versions

  • 4.29.10
  • 5.0.10

Solution

Upgrade to versions 4.29.10, 5.0.10 or above.

Impact 5.3 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
  • CWE-73: External Control of File Name or Path
  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

packagist/easycorp/easyadmin-bundle/GHSA-2wwr-9x6f-88gp.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Thu, 16 Jul 2026 12:19:27 +0000.