CVE-2020-26216: Typo3fluid/fluid Cross-Site Scripting Vulnerability
HIGHCVE-2020-26216 is a HIGH (CVSS 8.0) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Typo3fluid/fluid libraries in the Packagist ecosystem. The issue involves cross-site scripting through fluid view helper arguments. Remediation is available by upgrading affected packages to version 2.0.8, 2.1.7, 2.2.4, 2.3.7, 2.4.4, 2.5.11, 2.6.10.
CVE-2020-26216 at a Glance
Security Impact
CVSS: 8.0
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N).
How to Fix CVE-2020-26216
To remediate this vulnerability, upgrade all affected Typo3fluid/fluid dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade typo3fluid/fluid to 2.0.8
Upgrade typo3fluid/fluid to 2.1.7
Upgrade typo3fluid/fluid to 2.2.4
Upgrade typo3fluid/fluid to 2.3.7
Upgrade typo3fluid/fluid to 2.4.4
Upgrade typo3fluid/fluid to 2.5.11
Upgrade typo3fluid/fluid to 2.6.10
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for typo3fluid/fluid
How to Check if You Are Affected
To determine whether your application is affected by CVE-2020-26216, inspect your project dependencies for Typo3fluid/fluid:
inspect dependencies for typo3fluid/fluid
Analyze the terminal output to locate any version of Typo3fluid/fluid in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.8), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Typo3fluid/fluid, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2020-26216 Affected Typo3fluid/fluid Versions
7 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
typo3fluid/fluid
|
Packagist |
≥ 2.0.0
< 2.0.8
|
2.0.8
|
|
typo3fluid/fluid
|
Packagist |
≥ 2.1.0
< 2.1.7
|
2.1.7
|
|
typo3fluid/fluid
|
Packagist |
≥ 2.2.0
< 2.2.4
|
2.2.4
|
|
typo3fluid/fluid
|
Packagist |
≥ 2.3.0
< 2.3.7
|
2.3.7
|
|
typo3fluid/fluid
|
Packagist |
≥ 2.4.0
< 2.4.4
|
2.4.4
|
|
typo3fluid/fluid
|
Packagist |
≥ 2.5.0
< 2.5.11
|
2.5.11
|
|
typo3fluid/fluid
|
Packagist |
≥ 2.6.0
< 2.6.10
|
2.6.10
|
References
Frequently Asked Questions
What is CVE-2020-26216?
Which Typo3fluid/fluid versions are affected?
What version fixes CVE-2020-26216?
Is typo3fluid/fluid affected?
What is the CVSS score of CVE-2020-26216?
What CWE is associated with CVE-2020-26216?
How can I check Packagist dependencies for CVE-2020-26216?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hpjm-3ww5-6cpf",
"modified" : "2024-02-07T18:52:28Z",
"published" : "2020-11-18T21:06:07Z",
"aliases" : [ "CVE-2020-26216" ],
"summary" : "Cross-Site Scripting through Fluid view helper arguments",
"details" : "> ### Meta\n> * 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)\n> * CWE-79\n\n### Problem\n\nThree XSS vulnerabilities have been detected in Fluid:\n\n1. TagBasedViewHelper allowed XSS throug maliciously crafted `additionalAttributes` arrays by creating keys with attribute-closing quotes followed by HTML. When rendering such attributes, TagBuilder would not escape the keys.\n2. ViewHelpers which used the `CompileWithContentArgumentAndRenderStatic` trait, and which declared `escapeOutput = false`, would receive the content argument in unescaped format.\n3. Subclasses of AbstractConditionViewHelper would receive the `then` and `else` arguments in unescaped format.\n\n### Solution\nUpdate 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.\n\nUpdated versions of this package are bundled in following TYPO3 (`typo3/cms-core`) releases:\n\n* TYPO3 v9.5.23 (using typo3fluid/fluid v2.6.10)\n* TYPO3 v10.4.10 (using typo3fluid/fluid v2.6.10)\n\nThe specific vulnerabilities are prevented by:\n\n1. Explicitly escaping keys found in the `additionalAttributes` array passed to a TagBasedViewHelper before using them as attribute names.\n2. Detecting \"content argument\" on ViewHelpers using the trait CompileWithContentArgumentAndRenderStatic and escaping it based on the state of `escapeChildren` when `escapeOutput` is 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.\n3. Explicitly defining the `then` and `else` arguments on AbstractConditionViewHelper subclasses as escaped and applying escaping in all cases where escaping is not explicitly disabled by an enclosing ViewHelper.\n\n\n### Affected cases\n\n1. The fix for TagBasedViewHelper does not affect any valid use cases; it only prevents use of maliciously crafted attribute/value arrays passed as `additionalAttributes`.\n2. Any case where a ViewHelper with a \"content argument\" and which defines `escapeOutput = false` is 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}`.\n3. Any case where a condition ViewHelper is used with `then` or `else` arguments 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 the `then` argument because `f:render` disables output escaping.\n\nCases 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()}\" />`.\n\nCustom 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.**\n\n### Credits\nThanks to Jonas Eberle and Sinan Sekerci (Dreamlab Technologies) who reported this issue and to TYPO3 core merger Claus Due who fixed the issue.\n\n### References\n* [TYPO3-CORE-SA-2020-009](https://typo3.org/security/advisory/typo3-core-sa-2020-009)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "typo3fluid/fluid"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.0.8"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "typo3fluid/fluid"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.1.0"
}, {
"fixed" : "2.1.7"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "typo3fluid/fluid"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.2.0"
}, {
"fixed" : "2.2.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "typo3fluid/fluid"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.3.0"
}, {
"fixed" : "2.3.7"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "typo3fluid/fluid"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.4.0"
}, {
"fixed" : "2.4.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "typo3fluid/fluid"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.5.0"
}, {
"fixed" : "2.5.11"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "typo3fluid/fluid"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.6.0"
}, {
"fixed" : "2.6.10"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/TYPO3/Fluid/security/advisories/GHSA-hpjm-3ww5-6cpf"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-26216"
}, {
"type" : "WEB",
"url" : "https://github.com/TYPO3/Fluid/commit/f20db4e74cf9803c6cffca2ed2f03e1b0b89d0dc"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/typo3fluid/fluid/CVE-2020-26216.yaml"
}, {
"type" : "WEB",
"url" : "https://typo3.org/security/advisory/typo3-core-sa-2020-009"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2020-11-17T20:30:15Z",
"nvd_published_at" : null
}
}