CVE-2024-47069: Oveleon/contao cookiebar Cross-Site Scripting Vulnerability

MODERATE
Advisory Identifier: GHSA-296q-rj83-g9rq
CVSS 6.1
CWE-79
Published
Advisory Summary

CVE-2024-47069 is a MODERATE (CVSS 6.1) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Oveleon/contao cookiebar libraries in the Packagist ecosystem. The issue involves reflected cross site-scripting (xss) in oveleon cookiebar. Remediation is available by upgrading affected packages to version 1.16.3, 2.1.3.

CVE-2024-47069 at a Glance

CVE Identifier CVE-2024-47069
GHSA Identifier GHSA-296q-rj83-g9rq
Severity MODERATE
CVSS v3.1 Base Score 6.1
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Oveleon/contao cookiebar
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 6.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2024-47069

To remediate this vulnerability, upgrade all affected Oveleon/contao cookiebar dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

oveleon/contao-cookiebar fixed: 1.16.3
Upgrade oveleon/contao-cookiebar to 1.16.3
oveleon/contao-cookiebar fixed: 2.1.3
Upgrade oveleon/contao-cookiebar to 2.1.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for oveleon/contao-cookiebar

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-47069, inspect your project dependencies for Oveleon/contao cookiebar:

inspect dependencies for oveleon/contao-cookiebar

Analyze the terminal output to locate any version of Oveleon/contao cookiebar in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.16.3), 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 Oveleon/contao cookiebar, 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

## usd-2024-0009 | Reflected XSS in Oveleon Cookiebar ### Details **Advisory ID**: usd-2024-0009 **Product**: Cookiebar **Affected Version**: 2.X **Vulnerability 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:N **Vendor URL**: https://www.usd.de/ **Vendor acknowledged vulnerability**: Yes **Vendor Status**: Fixed **CVE Number**: Not requested yet **CVE Link**: Not requested yet **First Published**: Published **Last Update**: 2024-07-29 ### Affected Component The `block` function in `CookiebarController.php`. ### Desciption Oveleon's Cookiebar is an extension for the popular Contao CMS. The `block/locale` endpoint does not properly sanitize the user-controlled `locale` input before including it in the backend's HTTP response, thereby causing reflected XSS. ### Proof of Concept The vulnerability could be triggered by entering the following Link: ``` https://[redacted].de/cookiebar/block/dens82w%22%3E%3Cimg%20src%3da%20onerror%3dalert(1)%3Ew9qt n/[id]?redirect=https%3A%2F%2F[...]amp%3Biv_load_policy%3D3%26amp%3Bmo destbranding%3D1%26amp%3Brel%3D0 ``` It is likely related to the following function in the Oveleon Cookiebar source code: ```php /** * Block content * * @Route("/cookiebar/block/{locale}/{id}", name="cookiebar_block") */ public function block(Request $request, string $locale, int $id): Response { System::loadLanguageFile('tl_cookiebar', $locale); $this->framework->initialize(); $objCookie = CookieModel::findById($id); if (null === $objCookie || null === $request->headers->get('referer')) { throw new PageNotFoundException(); } $strUrl = $request->get('redirect'); // Protect against XSS attacks if(!Validator::isUrl($strUrl)) { return new Response('The redirect destination must be a valid URL.', Response::HTTP_BAD_REQUEST); } $objTemplate = new FrontendTemplate($objCookie->blockTemplate ?: 'ccb_element_blocker'); $objTemplate->language = $locale; $objTemplate->id = $objCookie->id; $objTemplate->title = $objCookie->title; $objTemplate->type = $objCookie->type; $objTemplate->iframeType = $objCookie->iframeType; $objTemplate->description = $objCookie->blockDescription; $objTemplate->redirect = $request->get('redirect'); $objTemplate->acceptAndDisplayLabel = $this->translator->trans('tl_cookiebar.acceptAndDisplayLabel', [], 'contao_default', $locale); return $objTemplate->getResponse(); } ``` ### Fix Sanitize the `locale` input to prevent XSS payloads from being executed in a user's browser. ### References - https://github.com/oveleon/contao-cookiebar/blob/2.x/src/Controller/CookiebarController.php - https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.html ### Timeline * **2024-04-24**: Vulnerability discovered by DR of usd AG. * **2024-07-25**: Probable cause of the vulnerability has been identified as Oveleon's Cookiebar Extension for Contao CMS. * **2024-07-25**: Vulnerability disclosed via GitHub Vulnerability Report. ### Credits This security vulnerability was identified by DR of usd AG. ### About usd Security Advisories In order to protect businesses against hackers and criminals, we always have to keep our skills and knowledge up to date. Thus, security research is just as important for our work as is building up a security community to promote the exchange of knowledge. After all, more security can only be achieved if many individuals take on the task. Our CST Academy and our usd HeroLab are essential parts of our security mission. We share the knowledge we gain in our practical work and our research through training courses and publications. In this context, the usd HeroLab publishes a series of papers on new vulnerabilities and current security issues. Always for the sake of our mission: "more security." https://www.usd.de ### Disclaimer The information provided in this security advisory is provided "as is" and without warranty of any kind. Details of this security advisory may be updated in order to provide as accurate information as possible.

CVE-2024-47069 Affected Oveleon/contao cookiebar Versions

2 component(s)
Fixed Versions:
1.16.32.1.3
Product / Package Ecosystem Affected Versions Fixed Version
oveleon/contao-cookiebar
Packagist
< 1.16.3
1.16.3
oveleon/contao-cookiebar
Packagist
≥ 2.0.0
< 2.1.3
2.1.3

References

Frequently Asked Questions

What is CVE-2024-47069?
CVE-2024-47069 is a security vulnerability in Oveleon/contao cookiebar involving Reflected Cross Site-Scripting (XSS) in Oveleon Cookiebar under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Oveleon/contao cookiebar versions are affected?
Affected versions include releases prior to 1.16.3, 2.1.3 across affected packages: oveleon/contao-cookiebar.
What version fixes CVE-2024-47069?
Upgrading to 1.16.3, 2.1.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is oveleon/contao-cookiebar affected?
Yes, oveleon/contao-cookiebar is affected in releases prior to 1.16.3, 2.1.3. Upgrade your dependency to 1.16.3, 2.1.3 or later.
What is the CVSS score of CVE-2024-47069?
CVE-2024-47069 has a CVSS v3.1 base score of 6.1 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2024-47069?
CVE-2024-47069 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (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.).
How can I check Packagist dependencies for CVE-2024-47069?
Run the dependency tree command: 'inspect dependencies for oveleon/contao-cookiebar'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-296q-rj83-g9rq",
  "modified" : "2024-09-23T19:12:07Z",
  "published" : "2024-07-26T14:28:26Z",
  "aliases" : [ "CVE-2024-47069" ],
  "summary" : "Reflected Cross Site-Scripting (XSS) in Oveleon Cookiebar",
  "details" : "## usd-2024-0009 | Reflected XSS in Oveleon Cookiebar\n\n### Details\n**Advisory ID**: usd-2024-0009 \n**Product**: Cookiebar   \n**Affected Version**: 2.X  \n**Vulnerability Type**: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')   \n**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:N   \n**Vendor URL**: https://www.usd.de/    \n**Vendor acknowledged vulnerability**: Yes    \n**Vendor Status**: Fixed   \n**CVE Number**: Not requested yet    \n**CVE Link**: Not requested yet    \n**First Published**: Published  \n**Last Update**: 2024-07-29\n\n\n### Affected Component\n\nThe `block` function in `CookiebarController.php`.\n\n\n### Desciption\n\nOveleon's Cookiebar is an extension for the popular Contao CMS.\nThe `block/locale` endpoint does not properly sanitize the user-controlled `locale` input before including it in the backend's HTTP response, thereby causing reflected XSS.\n\n### Proof of Concept\nThe vulnerability could be triggered by entering the following Link:\n\n```\nhttps://[redacted].de/cookiebar/block/dens82w%22%3E%3Cimg%20src%3da%20onerror%3dalert(1)%3Ew9qt\nn/[id]?redirect=https%3A%2F%2F[...]amp%3Biv_load_policy%3D3%26amp%3Bmo\ndestbranding%3D1%26amp%3Brel%3D0\n```\n\nIt is likely related to the following function in the Oveleon Cookiebar source code:\n\n```php\n    /**\n     * Block content\n     *\n     * @Route(\"/cookiebar/block/{locale}/{id}\", name=\"cookiebar_block\")\n     */\n    public function block(Request $request, string $locale, int $id): Response\n    {\n        System::loadLanguageFile('tl_cookiebar', $locale);\n\n        $this->framework->initialize();\n\n        $objCookie = CookieModel::findById($id);\n\n        if (null === $objCookie || null === $request->headers->get('referer'))\n        {\n            throw new PageNotFoundException();\n        }\n\n        $strUrl = $request->get('redirect');\n\n        // Protect against XSS attacks\n        if(!Validator::isUrl($strUrl))\n        {\n            return new Response('The redirect destination must be a valid URL.', Response::HTTP_BAD_REQUEST);\n        }\n\n        $objTemplate = new FrontendTemplate($objCookie->blockTemplate ?: 'ccb_element_blocker');\n\n        $objTemplate->language = $locale;\n        $objTemplate->id = $objCookie->id;\n        $objTemplate->title = $objCookie->title;\n        $objTemplate->type = $objCookie->type;\n        $objTemplate->iframeType = $objCookie->iframeType;\n        $objTemplate->description = $objCookie->blockDescription;\n        $objTemplate->redirect = $request->get('redirect');\n        $objTemplate->acceptAndDisplayLabel = $this->translator->trans('tl_cookiebar.acceptAndDisplayLabel', [], 'contao_default', $locale);\n\n        return $objTemplate->getResponse();\n    }\n```\n\n### Fix\nSanitize the `locale` input to prevent XSS payloads from being executed in a user's browser.\n\n\n### References\n- https://github.com/oveleon/contao-cookiebar/blob/2.x/src/Controller/CookiebarController.php\n- https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.html\n\n\n### Timeline\n* **2024-04-24**: Vulnerability discovered by DR of usd AG.\n* **2024-07-25**: Probable cause of the vulnerability has been identified as Oveleon's Cookiebar Extension for Contao CMS.\n* **2024-07-25**: Vulnerability disclosed via GitHub Vulnerability Report.\n\n\n### Credits\nThis security vulnerability was identified by DR of usd AG.\n\n\n### About usd Security Advisories\nIn order to protect businesses against hackers and criminals, we always have to keep our skills and knowledge up to date. Thus, security research is just as important for our work as is building up a security community to promote the exchange of knowledge. After all, more security can only be achieved if many individuals take on the task.\n\nOur CST Academy and our usd HeroLab are essential parts of our security mission. We share the knowledge we gain in our practical work and our research through training courses and publications. In this context, the usd HeroLab publishes a series of papers on new vulnerabilities and current security issues. \n\nAlways for the sake of our mission: \"more security.\"\n\nhttps://www.usd.de\n\n\n### Disclaimer\nThe information provided in this security advisory is provided \"as is\" and without warranty of any kind. Details of this security advisory may be updated in order to provide as accurate information as possible.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "oveleon/contao-cookiebar"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.16.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "oveleon/contao-cookiebar"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0"
      }, {
        "fixed" : "2.1.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/oveleon/contao-cookiebar/security/advisories/GHSA-296q-rj83-g9rq"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-47069"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/oveleon/contao-cookiebar/commit/1d57470be5878f66d5e1e23f624dd387564b9b8d"
  }, {
    "type" : "WEB",
    "url" : "https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.html"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/oveleon/contao-cookiebar"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/oveleon/contao-cookiebar/blob/2.x/src/Controller/CookiebarController.php"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-07-26T14:28:26Z",
    "nvd_published_at" : "2024-09-23T16:15:07Z"
  }
}