From 1a5b686fab2de5611df957e318739de07243c5d2 Mon Sep 17 00:00:00 2001 From: "advisory-database[bot]" <45398580+advisory-database[bot]@users.noreply.github.com> Date: Tue, 6 Aug 2024 18:26:39 +0000 Subject: [PATCH] Publish GHSA-2rwj-7xq8-4gx4 --- .../GHSA-2rwj-7xq8-4gx4.json | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 advisories/github-reviewed/2024/08/GHSA-2rwj-7xq8-4gx4/GHSA-2rwj-7xq8-4gx4.json diff --git a/advisories/github-reviewed/2024/08/GHSA-2rwj-7xq8-4gx4/GHSA-2rwj-7xq8-4gx4.json b/advisories/github-reviewed/2024/08/GHSA-2rwj-7xq8-4gx4/GHSA-2rwj-7xq8-4gx4.json new file mode 100644 index 00000000000..ceeddea04a5 --- /dev/null +++ b/advisories/github-reviewed/2024/08/GHSA-2rwj-7xq8-4gx4/GHSA-2rwj-7xq8-4gx4.json @@ -0,0 +1,69 @@ +{ + "schema_version": "1.4.0", + "id": "GHSA-2rwj-7xq8-4gx4", + "modified": "2024-08-06T18:24:47Z", + "published": "2024-08-06T18:24:47Z", + "aliases": [ + "CVE-2024-41677" + ], + "summary": "Qwik has a potential mXSS vulnerability due to improper HTML escaping", + "details": "### Summary\n\nA potential mXSS vulnerability exists in Qwik for versions up to 1.6.0.\n\n### Details\n\nQwik improperly escapes HTML on server-side rendering. It converts strings according to the following rules:\n\nhttps://github.com/QwikDev/qwik/blob/v1.5.5/packages/qwik/src/core/render/ssr/render-ssr.ts#L1182-L1208\n\n- If the string is an attribute value:\n - `\"` -> `"`\n - `&` -> `&`\n - Other characters -> No conversion\n- Otherwise:\n - `<` -> `<`\n - `>` -> `>`\n - `&` -> `&`\n - Other characters -> No conversion\n\nIt sometimes causes the situation that the final DOM tree rendered on browsers is different from what Qwik expects on server-side rendering. This may be leveraged to perform XSS attacks, and a type of the XSS is known as mXSS (mutation XSS).\n\n## PoC\n\nA vulnerable component:\n```javascript\nimport { component$ } from \"@builder.io/qwik\";\nimport { useLocation } from \"@builder.io/qwik-city\";\n\nexport default component$(() => {\n \n // user input\n const { url } = useLocation();\n const href = url.searchParams.get(\"href\") ?? \"https://example.com\";\n\n return (\n