CVE-2021-41267 Webcache Poisoning in Symfony

Medium 6.5 Published Updated

Attackers can poison web caches by forging X-Forwarded-Prefix headers in Symfony applications, potentially serving malicious content to users.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2021-41267?

CVE-2021-41267 is a medium-severity vulnerability in Sensiolabs Symfony, published on 24 Nov 2021. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

Symfony/Http-Kernel is the HTTP kernel component for Symfony, a PHP framework for web and console applications and a set of reusable PHP components. Headers that are not part of the "trusted_headers" allowed list are ignored and protect users from "Cache poisoning" attacks. In Symfony 5.2, maintainers added support for the `X-Forwarded-Prefix` headers, but this header was accessible in SubRequest, even if it was not part of the "trusted_headers" allowed list. An attacker could leverage this opportunity to forge requests containing a `X-Forwarded-Prefix` header, leading to a web cache poisoning issue. Versions 5.3.12 and later have a patch to ensure that the `X-Forwarded-Prefix` header is not forwarded to subrequests when it is not trusted.

Weakness: CWE-444

Which versions are affected by CVE-2021-41267?

5 open source packages ship an affected version, including symfony/http-kernel, symfony and symfony/symfony. It affects 1 product.

PackageAffectedFixed in
symfony/http-kernel PackagistFrom 5.2.05.3.12
symfony/http-kernel PackagistFrom 5.2.05.3.12
symfony BitnamiFrom 5.2.05.3.12
symfony/symfony PackagistFrom 5.2.05.3.12
symfony/symfony PackagistFrom 5.2.05.3.12

Products include Sensiolabs Symfony.

How do I fix CVE-2021-41267?

Upgrade symfony/http-kernel to 5.3.12 or later.

Is CVE-2021-41267 being exploited?

There is no known exploitation of CVE-2021-41267 in the wild and no public exploit code.

All Sensiolabs Symfony vulnerabilities

Sources

Also known as BIT-symfony-2021-41267, GHSA-q3j3-w37x-hq2q.

Is CVE-2021-41267 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free