Summary
Meta
- CVSS:
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N/E:F/RL:O/RC:C(5.7) - CWE-79
Problem
Three XSS vulnerabilities have been detected in Fluid:
- TagBasedViewHelper allowed XSS throug maliciously crafted
additionalAttributesarrays by creating keys with attribute-closing quotes followed by HTML. When rendering such attributes, TagBuilder would not escape the keys. - ViewHelpers which used the
CompileWithContentArgumentAndRenderStatictrait, and which declaredescapeOutput = false, would receive the content argument in unescaped format. - Subclasses of AbstractConditionViewHelper would receive the
thenandelsearguments in unescaped format.
Affected cases
- The fix for TagBasedViewHelper does not affect any valid use cases; it only prevents use of maliciously crafted attribute/value arrays passed as
additionalAttributes. - Any case where a ViewHelper with a "content argument" and which defines
escapeOutput = falseis used with the content argument instead of passing variables as child node - e.g.<v:h content="{variable}" />instead of<v:h>{variable}</v:h>to intentionally circumvent escaping of any HTML in{variable}. - Any case where a condition ViewHelper is used with
thenorelsearguments to render a variable containing HTML, excluding cases where the variable is intentionally unescaped - e.g.<f:if condition="1" then="{variable -> f:format.raw()}" />, and excluding any cases where a ViewHelper is used as argument value and the ViewHelper intentionally disables escaping - e.g.<f:if condition="1" then="{f:render(section: 'MySection')}" />does not escape thethenargument becausef:renderdisables output escaping.
Cases 2 and 3 can be mitigated to allow variables with HTML to not be escaped, by intentionally disabling escaping by chaining the variable used in the argument with f:format.raw as described in case 3. Note that this constitutes a potential security issue, for which the template author is solely responsible. Example: <f:if condition="1" then="{intentionalHtmlVariable}" /> can allow HTML in {intentionalHtmlVariable} by adding -> f:format.raw() - to become <f:if condition="1" then="{intentionalHtmlVariable -> f:format.raw()}" />.
Custom ViewHelpers which use CompileWithContentArgumentAndRenderStatic can alternatively pass a 6th argument with value false to the call to registerArgument which registers the "content argument", which explicitly disables escaping of the argument value: $this->registerArgument('arg', 'string', 'My argument', false, null, false);. Note that this constitutes a potential security issue for which the ViewHelper author is solely responsible. Variables containing HTML should only be allowed after taking great care to prevent XSS through other means, e.g. sanitising the variable before it is assigned to Fluid or only allowing such variables to come from trusted sources.
Credits
Thanks to Jonas Eberle and Sinan Sekerci (Dreamlab Technologies) who reported this issue and to TYPO3 core merger Claus Due who fixed the issue.
References
Impact
Untrusted input is rendered as active markup in a victim's browser, which can run script in their session. Typical impact: session or credential theft, and actions taken as the user.
CVE-2020-26216 has a CVSS score of 8.0 (High). The vector is network-reachable, no privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (2.0.8, 2.1.7, 2.2.4, 2.3.7, 2.4.4, 2.5.11, 2.6.10); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Remediation advice
Update to versions 2.0.8, 2.1.7, 2.2.4, 2.3.7, 2.4.4, 2.5.11 or 2.6.10 of this typo3fluid/fluid package that fix the problem described.
Updated versions of this package are bundled in following TYPO3 (typo3/cms-core) releases:
- TYPO3 v9.5.23 (using typo3fluid/fluid v2.6.10)
- TYPO3 v10.4.10 (using typo3fluid/fluid v2.6.10)
The specific vulnerabilities are prevented by:
- Explicitly escaping keys found in the
additionalAttributesarray passed to a TagBasedViewHelper before using them as attribute names. - Detecting "content argument" on ViewHelpers using the trait CompileWithContentArgumentAndRenderStatic and escaping it based on the state of
escapeChildrenwhenescapeOutputis toggled off. Escaping still will not occur if explicitly disabled by an enclosing ViewHelper. This homogenises escaping behavior of "content arguments" so the same strategy is used whether the "content" argument is passed as argument or child content. - Explicitly defining the
thenandelsearguments on AbstractConditionViewHelper subclasses as escaped and applying escaping in all cases where escaping is not explicitly disabled by an enclosing ViewHelper.
Frequently Asked Questions
- What is CVE-2020-26216? CVE-2020-26216 is a high-severity cross-site scripting (XSS) vulnerability in typo3fluid/fluid (composer), affecting versions >= 2.0.0, < 2.0.8. It is fixed in 2.0.8, 2.1.7, 2.2.4, 2.3.7, 2.4.4, 2.5.11, 2.6.10. Untrusted input is rendered as active markup in a victim's browser, which can run script in their session.
- How severe is CVE-2020-26216? CVE-2020-26216 has a CVSS score of 8.0 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of typo3fluid/fluid are affected by CVE-2020-26216? typo3fluid/fluid (composer) versions >= 2.0.0, < 2.0.8 is affected.
- Is there a fix for CVE-2020-26216? Yes. CVE-2020-26216 is fixed in 2.0.8, 2.1.7, 2.2.4, 2.3.7, 2.4.4, 2.5.11, 2.6.10. Upgrade to this version or later.
- Is CVE-2020-26216 exploitable, and should I be worried? Whether CVE-2020-26216 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2020-26216 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2020-26216?
- Upgrade
typo3fluid/fluidto 2.0.8 or later - Upgrade
typo3fluid/fluidto 2.1.7 or later - Upgrade
typo3fluid/fluidto 2.2.4 or later - Upgrade
typo3fluid/fluidto 2.3.7 or later - Upgrade
typo3fluid/fluidto 2.4.4 or later - Upgrade
typo3fluid/fluidto 2.5.11 or later - Upgrade
typo3fluid/fluidto 2.6.10 or later
- Upgrade