{"id":23625,"date":"2024-10-30T10:21:20","date_gmt":"2024-10-30T09:21:20","guid":{"rendered":"https:\/\/herolab.usd.de\/security-advisories\/usd-2024-0009\/"},"modified":"2024-11-08T16:03:13","modified_gmt":"2024-11-08T15:03:13","slug":"usd-2024-0009","status":"publish","type":"page","link":"https:\/\/herolab.usd.de\/en\/security-advisories\/usd-2024-0009\/","title":{"rendered":"usd-2024-0009"},"content":{"rendered":"<p>[et_pb_section fb_built=\"1\" _builder_version=\"4.21.0\" _module_preset=\"default\" background_color=\"#2E353D\" custom_padding=\"||0px|||\" global_colors_info=\"{}\"][et_pb_row _builder_version=\"4.25.2\" _module_preset=\"default\" global_colors_info=\"{}\"][et_pb_column type=\"4_4\" _builder_version=\"4.21.0\" _module_preset=\"default\" global_colors_info=\"{}\"][et_pb_text _builder_version=\"4.27.2\" _module_preset=\"default\" custom_padding=\"||13px|||\" global_colors_info=\"{}\"]<\/p>\n<h1>usd-2024-0009 | Reflected XSS in Oveleon Cookiebar<\/h1>\n<h1><\/h1>\n<p><strong>Advisory ID<\/strong>: usd-2024-0009<br \/><strong>Product<\/strong>: Cookiebar<br \/><strong>Affected Version<\/strong>: &lt;1.16.2<br \/><strong>Vulnerability Type<\/strong>: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')<br \/><strong>Security Risk<\/strong>: HIGH, CVSS:4.0\/AV:N\/AC:L\/AT:N\/PR:N\/UI:A\/VC:N\/VI:L\/VA:N\/SC:L\/SI:L\/SA:N<br \/><strong>Vendor URL<\/strong>: <a href=\"https:\/\/www.oveleon.de\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.oveleon.de\/<\/a><br \/><strong>Vendor acknowledged vulnerability<\/strong>: Yes<br \/><strong>Vendor Status<\/strong>: Fixed<br \/><strong>CVE Number<\/strong>: CVE-2024-47069\u00a0<br \/><strong>CVE Link:\u00a0<\/strong><a href=\"https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2024-47069\" target=\"_blank\" rel=\"noopener\">CVE-2024-47069<\/a><\/p>\n<h3>Affected Component<\/h3>\n<p>The <strong>block<\/strong> function in <strong>CookiebarController.php<\/strong>.<\/p>\n<h3>Desciption<\/h3>\n<p>Oveleon's Cookiebar is an extension for the popular Contao CMS.<br \/>The <strong>block\/locale<\/strong> endpoint does not properly sanitize the user-controlled <strong>locale<\/strong> input before including it in the backend's HTTP response, thereby causing reflected XSS.<\/p>\n<h3>Proof of Concept<\/h3>\n<p>The vulnerability could be triggered by entering the following Link:<\/p>\n<pre class=\"codehilite\" style=\"line-height: 125%;background: #263238;color: #eff\">https:\/\/[redacted].de\/cookiebar\/block\/dens82w%22%3E%3Cimg%20src%3da%20onerror%3dalert(1)%3Ew9qt]()n\/[id]?redirect=https%3A%2F%2Fwww.youtube.com%2F[...]%3D1%26amp%3Brel%3D0<\/pre>\n<p>It is related to the following function in the Oveleon Cookiebar source code:<\/p>\n<div style=\"color: #e2cca9;background-color: #292828;font-family: 'Droid Sans Mono', 'monospace', monospace;font-weight: normal;font-size: 14px;line-height: 19px\">\n<div style=\"color: #e2cca9;background-color: #292828;font-family: 'Droid Sans Mono', 'monospace', monospace;font-weight: normal;font-size: 14px;line-height: 19px\">\n<div><span style=\"color: #b0b846\"> <\/span><span style=\"color: #928374;font-style: italic\">\/**<\/span><\/div>\n<div><span style=\"color: #928374;font-style: italic\"> * Block content<\/span><\/div>\n<div><span style=\"color: #928374;font-style: italic\"> *<\/span><\/div>\n<div><span style=\"color: #928374;font-style: italic\"> * @Route(\"\/cookiebar\/block\/{locale}\/{id}\", name=\"cookiebar_block\")<\/span><\/div>\n<div><span style=\"color: #928374;font-style: italic\"> *\/<\/span><\/div>\n<div><span style=\"color: #b0b846\"> <\/span><span style=\"color: #f28534\">public<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #f2594b\">function<\/span><span style=\"color: #b0b846\"> block<\/span><span style=\"color: #e2cca9\">(<\/span><span style=\"color: #80aa9e\">Request<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #e2cca9\">$request,<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #f2594b\">string<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #e2cca9\">$locale,<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #f2594b\">int<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #e2cca9\">$id)<\/span><span style=\"color: #f28534\">:<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #80aa9e\">Response<\/span><\/div>\n<div><span style=\"color: #b0b846\"> <\/span><span style=\"color: #e2cca9\">{<\/span><\/div>\n<div><span style=\"color: #b0b846\"> <\/span><span style=\"color: #80aa9e\">System<\/span><span style=\"color: #e2cca9\">::<\/span><span style=\"color: #b0b846\">loadLanguageFile<\/span><span style=\"color: #e2cca9\">(<\/span><span style=\"color: #e9b143\">'tl_cookiebar'<\/span><span style=\"color: #e2cca9\">,<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #e2cca9\">$locale);<\/span><\/div>\n<p>&nbsp;<\/p>\n<div><span style=\"color: #b0b846\"> <\/span><span style=\"color: #e2cca9\">$<\/span><span style=\"color: #d3869b\">this<\/span><span style=\"color: #e2cca9\">-&gt;framework-&gt;<\/span><span style=\"color: #b0b846\">initialize<\/span><span style=\"color: #e2cca9\">();<\/span><\/div>\n<p>&nbsp;<\/p>\n<div><span style=\"color: #b0b846\"> <\/span><span style=\"color: #e2cca9\">$objCookie<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #f28534\">=<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #80aa9e\">CookieModel<\/span><span style=\"color: #e2cca9\">::<\/span><span style=\"color: #b0b846\">findById<\/span><span style=\"color: #e2cca9\">($id);<\/span><\/div>\n<p>&nbsp;<\/p>\n<div><span style=\"color: #b0b846\"> <\/span><span style=\"color: #f2594b\">if<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #e2cca9\">(<\/span><span style=\"color: #8bba7f\">null<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #f28534\">===<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #e2cca9\">$objCookie<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #f28534\">||<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #8bba7f\">null<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #f28534\">===<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #e2cca9\">$request-&gt;headers-&gt;<\/span><span style=\"color: #b0b846\">get<\/span><span style=\"color: #e2cca9\">(<\/span><span style=\"color: #e9b143\">'referer'<\/span><span style=\"color: #e2cca9\">))<\/span><\/div>\n<div><span style=\"color: #b0b846\"> <\/span><span style=\"color: #e2cca9\">{<\/span><\/div>\n<div><span style=\"color: #b0b846\"> <\/span><span style=\"color: #f2594b\">throw<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #f2594b\">new<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #80aa9e\">PageNotFoundException<\/span><span style=\"color: #e2cca9\">();<\/span><\/div>\n<div><span style=\"color: #b0b846\"> <\/span><span style=\"color: #e2cca9\">}<\/span><\/div>\n<p>&nbsp;<\/p>\n<div><span style=\"color: #b0b846\"> <\/span><span style=\"color: #e2cca9\">$strUrl<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #f28534\">=<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #e2cca9\">$request-&gt;<\/span><span style=\"color: #b0b846\">get<\/span><span style=\"color: #e2cca9\">(<\/span><span style=\"color: #e9b143\">'redirect'<\/span><span style=\"color: #e2cca9\">);<\/span><\/div>\n<p>&nbsp;<\/p>\n<div><span style=\"color: #e2cca9\"> <\/span><span style=\"color: #928374;font-style: italic\">\/\/ Protect against XSS attacks<\/span><\/div>\n<div><span style=\"color: #b0b846\"> <\/span><span style=\"color: #f2594b\">if<\/span><span style=\"color: #e2cca9\">(<\/span><span style=\"color: #f28534\">!<\/span><span style=\"color: #80aa9e\">Validator<\/span><span style=\"color: #e2cca9\">::<\/span><span style=\"color: #b0b846\">isUrl<\/span><span style=\"color: #e2cca9\">($strUrl))<\/span><\/div>\n<div><span style=\"color: #b0b846\"> <\/span><span style=\"color: #e2cca9\">{<\/span><\/div>\n<div><span style=\"color: #b0b846\"> <\/span><span style=\"color: #f2594b\">return<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #f2594b\">new<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #80aa9e\">Response<\/span><span style=\"color: #e2cca9\">(<\/span><span style=\"color: #e9b143\">'The redirect destination must be a valid URL.'<\/span><span style=\"color: #e2cca9\">,<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #80aa9e\">Response<\/span><span style=\"color: #e2cca9\">::<\/span><span style=\"color: #b0b846\">HTTP_BAD_REQUEST<\/span><span style=\"color: #e2cca9\">);<\/span><\/div>\n<div><span style=\"color: #b0b846\"> <\/span><span style=\"color: #e2cca9\">}<\/span><\/div>\n<p>&nbsp;<\/p>\n<div><span style=\"color: #b0b846\"> <\/span><span style=\"color: #e2cca9\">$objTemplate<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #f28534\">=<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #f2594b\">new<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #80aa9e\">FrontendTemplate<\/span><span style=\"color: #e2cca9\">($objCookie-&gt;blockTemplate<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #f28534\">?:<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #e9b143\">'ccb_element_blocker'<\/span><span style=\"color: #e2cca9\">);<\/span><\/div>\n<p>&nbsp;<\/p>\n<div><span style=\"color: #b0b846\"> <\/span><span style=\"color: #e2cca9\">$objTemplate-&gt;language<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #f28534\">=<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #e2cca9\">$locale;<\/span><\/div>\n<div><span style=\"color: #b0b846\"> <\/span><span style=\"color: #e2cca9\">$objTemplate-&gt;id<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #f28534\">=<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #e2cca9\">$objCookie-&gt;id;<\/span><\/div>\n<div><span style=\"color: #b0b846\"> <\/span><span style=\"color: #e2cca9\">$objTemplate-&gt;title<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #f28534\">=<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #e2cca9\">$objCookie-&gt;title;<\/span><\/div>\n<div><span style=\"color: #b0b846\"> <\/span><span style=\"color: #e2cca9\">$objTemplate-&gt;type<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #f28534\">=<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #e2cca9\">$objCookie-&gt;type;<\/span><\/div>\n<div><span style=\"color: #b0b846\"> <\/span><span style=\"color: #e2cca9\">$objTemplate-&gt;iframeType<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #f28534\">=<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #e2cca9\">$objCookie-&gt;iframeType;<\/span><\/div>\n<div><span style=\"color: #b0b846\"> <\/span><span style=\"color: #e2cca9\">$objTemplate-&gt;description<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #f28534\">=<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #e2cca9\">$objCookie-&gt;blockDescription;<\/span><\/div>\n<div><span style=\"color: #b0b846\"> <\/span><span style=\"color: #e2cca9\">$objTemplate-&gt;redirect<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #f28534\">=<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #e2cca9\">$request-&gt;<\/span><span style=\"color: #b0b846\">get<\/span><span style=\"color: #e2cca9\">(<\/span><span style=\"color: #e9b143\">'redirect'<\/span><span style=\"color: #e2cca9\">);<\/span><\/div>\n<div><span style=\"color: #b0b846\"> <\/span><span style=\"color: #e2cca9\">$objTemplate-&gt;acceptAndDisplayLabel<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #f28534\">=<\/span><span style=\"color: #b0b846\"> <\/span><\/div>\n<div><span style=\"color: #e2cca9\"> $<\/span><span style=\"color: #d3869b\">this<\/span><span style=\"color: #e2cca9\">-&gt;translator-&gt;<\/span><span style=\"color: #b0b846\">trans<\/span><span style=\"color: #e2cca9\">(<\/span><span style=\"color: #e9b143\">'tl_cookiebar.acceptAndDisplayLabel'<\/span><span style=\"color: #e2cca9\">,<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #e2cca9\">[],<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #e9b143\">'contao_default'<\/span><span style=\"color: #e2cca9\">,<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #e2cca9\">$locale);<\/span><\/div>\n<p>&nbsp;<\/p>\n<div><span style=\"color: #b0b846\"> <\/span><span style=\"color: #f2594b\">return<\/span><span style=\"color: #b0b846\"> <\/span><span style=\"color: #e2cca9\">$objTemplate-&gt;<\/span><span style=\"color: #b0b846\">getResponse<\/span><span style=\"color: #e2cca9\">();<\/span><\/div>\n<div><span style=\"color: #b0b846\"> <\/span><span style=\"color: #e2cca9\">}<\/span><\/div>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<h3>Fix<\/h3>\n<p>Sanitize the <strong>locale<\/strong> input to prevent XSS payloads from being executed in a user's browser.<\/p>\n<h3>References<\/h3>\n<ul>\n<li><a href=\"https:\/\/github.com\/oveleon\/contao-cookiebar\/blob\/2.x\/src\/Controller\/CookiebarController.php\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/oveleon\/contao-cookiebar\/blob\/2.x\/src\/Controller\/CookiebarController.php<\/a><\/li>\n<li><a href=\"https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Cross_Site_Scripting_Prevention_Cheat_Sheet.html\" target=\"_blank\" rel=\"noopener\">https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Cross_Site_Scripting_Prevention_Cheat_Sheet.html<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/oveleon\/contao-cookiebar\/security\/advisories\/GHSA-296q-rj83-g9rq\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/oveleon\/contao-cookiebar\/security\/advisories\/GHSA-296q-rj83-g9rq<\/a><\/li>\n<\/ul>\n<h3>Timeline<\/h3>\n<ul>\n<li><strong>2024-04-24<\/strong>: Vulnerability discovered by DR of usd AG.<\/li>\n<li><strong>2024-07-25<\/strong>: Probable cause of the vulnerability has been identified as Oveleon's Cookiebar Extension for Contao CMS.<\/li>\n<li><strong>2024-07-25<\/strong>: Vulnerability disclosed via GitHub Vulnerability Report.<\/li>\n<li><strong>2024-07-26<\/strong>: Vulnerability patched by Oveleon and GitHub advisory published.<\/li>\n<\/ul>\n<h3>Credits<\/h3>\n<p>This security vulnerability was identified by DR of usd AG.<\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>usd-2024-0009 | Reflected XSS in Oveleon Cookiebar Advisory ID: usd-2024-0009Product: CookiebarAffected Version: &lt;1.16.2Vulnerability Type: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')Security Risk: HIGH, CVSS:4.0\/AV:N\/AC:L\/AT:N\/PR:N\/UI:A\/VC:N\/VI:L\/VA:N\/SC:L\/SI:L\/SA:NVendor URL: https:\/\/www.oveleon.de\/Vendor acknowledged vulnerability: YesVendor Status: FixedCVE Number: CVE-2024-47069\u00a0CVE Link:\u00a0CVE-2024-47069 Affected Component The block function in CookiebarController.php. Desciption Oveleon's Cookiebar is an extension for the popular Contao [&hellip;]<\/p>\n","protected":false},"author":114,"featured_media":0,"parent":16124,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_et_pb_use_builder":"on","_et_pb_old_content":"","_et_gb_content_width":"","inline_featured_image":false,"footnotes":""},"class_list":["post-23625","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/23625","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/users\/114"}],"replies":[{"embeddable":true,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/comments?post=23625"}],"version-history":[{"count":3,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/23625\/revisions"}],"predecessor-version":[{"id":23628,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/23625\/revisions\/23628"}],"up":[{"embeddable":true,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/16124"}],"wp:attachment":[{"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/media?parent=23625"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}