SymfonyWorld Online 2021 Winter Edition December 9 – 10, 2021 100% Online 25 talks and 10 workshops

CVE-2020-5274: Fix Exception message escaping rendered by ErrorHandler

Affected versions

Symfony 4.4.0 to 4.4.3 and 5.0.0 to 5.0.4 versions of the Symfony ErrorHandler component are affected by this security issue.

The issue has been fixed in Symfony 4.4.4 and 5.0.4.


When ErrorHandler renders an exception HTML page, it uses un-escaped properties from the related Exception class to render the stacktrace. The security issue comes from the fact that the stacktraces were also displayed in non-debug environments.


The ErrorHandler class now escapes all properties coming from the related Exception, and the stacktrace is not displayed anymore in non-debug environments.

The patches for this issue are available here and here for 4.4 branch.


I would like to thank Luka Sikic for reporting & Yonel Ceruto and Jérémy Derussé for fixing the issue.

Manage your notification preferences to receive an email as soon as a Symfony security release is published.
If you have found a security issue in Symfony, please send the details to security [at] and don't disclose it publicly until we can provide a fix for it.
Help the Symfony project!

As with any Open-Source project, contributing code or documentation is the most common way to help, but we also have a wide range of sponsoring opportunities.

CVE-2020-5274: Fix Exception message escaping rendered by ErrorHandler

Tweet this


It says that Symfony 5.0.0 to 5.0.4 are affected and that the issue was fixed in version 5.0.4. Shouldn't that be '5.0.0 to 5.0.3' as the affected versions?

Comments are closed.

To ensure that comments stay relevant, they are closed for old posts.