Headline
CVE-2023-3042: Broken Access Control — Normalization Filter
In dotCMS, versions mentioned, a flaw in the NormalizationFilter does not strip double slashes (//) from URLs, potentially enabling bypasses for XSS and access controls. An example affected URL is https://demo.dotcms.com//html/portlet/ext/files/edit_text_inc.jsp https://demo.dotcms.com//html/portlet/ext/files/edit_text_inc.jsp , which should return a 404 response but didn’t.
The oversight in the default invalid URL character list can be viewed at the provided GitHub link https://github.com/dotCMS/core/blob/master/dotCMS/src/main/java/com/dotcms/filters/NormalizationFilter.java#L37 .
To mitigate, users can block URLs with double slashes at firewalls or utilize dotCMS config variables.
Specifically, they can use the DOT_URI_NORMALIZATION_FORBIDDEN_STRINGS environmental variable to add // to the list of invalid strings.
Additionally, the DOT_URI_NORMALIZATION_FORBIDDEN_REGEX variable offers more detailed control, for instance, to block //html.* URLs.
Fix Version:23.06+, LTS 22.03.7+, LTS 23.01.4+
Mitigation:
URLs that contain double slashes can be blocked at an upstream firewall / WAF or can be blocked by using dotCMS config variables. In dotCMS, the default list of invalid characters can be overridden by passing an environmental variable DOT_URI_NORMALIZATION_FORBIDDEN_STRINGS that adds // to a comma separated list of invalid strings, e.g.:
DOT_URI_NORMALIZATION_FORBIDDEN_STRINGS=;,…,/./,\,?,%3B,%2E,%5C,%3F,%00,\0,\r,\n,\f,//
It is also possible to pass an environmental variable DOT_URI_NORMALIZATION_FORBIDDEN_REGEX regex that can be tested for and blocked for more fine grained control. For example, to block //html.* you could set:
DOT_URI_NORMALIZATION_FORBIDDEN_REGEX=^//html/.*
Related news
In dotCMS, versions mentioned, a flaw in the NormalizationFilter does not strip double slashes (//) from URLs, potentially enabling bypasses for XSS and access controls. An example affected URL is https://demo.dotcms.com//html/portlet/ext/files/edit_text_inc.jsp https://demo.dotcms.com//html/portlet/ext/files/edit_text_inc.jsp , which should return a 404 response but didn't. The oversight in the default invalid URL character list can be viewed at the provided GitHub link https://github.com/dotCMS/core/blob/master/dotCMS/src/main/java/com/dotcms/filters/NormalizationFilter.java#L37 . To mitigate, users can block URLs with double slashes at firewalls or utilize dotCMS config variables. Specifically, they can use the DOT_URI_NORMALIZATION_FORBIDDEN_STRINGS environmental variable to add // to the list of invalid strings. Additionally, the DOT_URI_NORMALIZATION_FORBIDDEN_REGEX variable offers more detailed control, for instance, to block //html.* URLs. Fix Version:23.06+, LTS 22.0...