CWE-79
AllowedImproper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Abstraction: Base · Status: Stable
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.
66707 vulnerabilities reference this CWE, most recent first.
GHSA-W2VF-HMQ9-55G6
Vulnerability from github – Published: 2022-11-17 06:30 – Updated: 2022-11-18 00:30Keyfactor EJBCA before 7.10.0 allows XSS.
{
"affected": [],
"aliases": [
"CVE-2022-42954"
],
"database_specific": {
"cwe_ids": [
"CWE-79"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-11-17T05:15:00Z",
"severity": "MODERATE"
},
"details": "Keyfactor EJBCA before 7.10.0 allows XSS.",
"id": "GHSA-w2vf-hmq9-55g6",
"modified": "2022-11-18T00:30:17Z",
"published": "2022-11-17T06:30:18Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-42954"
},
{
"type": "WEB",
"url": "https://support.keyfactor.com/s/detail/a6x1Q000000CwCjQAK"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-W2VG-2G93-23J6
Vulnerability from github – Published: 2022-05-14 03:31 – Updated: 2022-05-14 03:31Cells Blog 3.5 has XSS via the pub_readpost.php fmid parameter.
{
"affected": [],
"aliases": [
"CVE-2017-17949"
],
"database_specific": {
"cwe_ids": [
"CWE-79"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2017-12-28T18:29:00Z",
"severity": "MODERATE"
},
"details": "Cells Blog 3.5 has XSS via the pub_readpost.php fmid parameter.",
"id": "GHSA-w2vg-2g93-23j6",
"modified": "2022-05-14T03:31:58Z",
"published": "2022-05-14T03:31:58Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-17949"
},
{
"type": "WEB",
"url": "https://github.com/d4wner/Vulnerabilities-Report/blob/master/cell.md"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-W2VJ-39QV-7VH7
Vulnerability from github – Published: 2025-11-13 22:38 – Updated: 2025-11-27 08:12Summary
A Reflected Cross-Site Scripting (XSS) vulnerability exists in Astro's development server error pages when the trailingSlash configuration option is used. An attacker can inject arbitrary JavaScript code that executes in the victim's browser context by crafting a malicious URL. While this vulnerability only affects the development server and not production builds, it could be exploited to compromise developer environments through social engineering or malicious links.
Details
Vulnerability Location
https://github.com/withastro/astro/blob/5bc37fd5cade62f753aef66efdf40f982379029a/packages/astro/src/template/4xx.ts#L133-L149
Root Cause
The vulnerability was introduced in commit 536175528 (PR #12994) , as part of a feature to "redirect trailing slashes on on-demand rendered pages." The feature added a helpful 404 error page in development mode to alert developers of trailing slash mismatches.
Issue: The corrected variable, which is derived from the user-controlled pathname parameter, is directly interpolated into the HTML without proper escaping. While the pathname variable itself is escaped elsewhere in the same file (line 114: escape(pathname)), the corrected variable is not sanitized before being inserted into both the href attribute and the link text.
Attack Vector
When a developer has configured trailingSlash to 'always' or 'never' and visits a URL with a mismatched trailing slash, the development server returns a 404 page containing the vulnerable template. An attacker can craft a URL with JavaScript payloads that will be executed when the page is rendered.
PoC
Local Testing (localhost)
Basic vulnerability verification in local development environment
Show details `astro.config.mjs`:import { defineConfig } from 'astro/config';
export default defineConfig({
trailingSlash: 'never', // or 'always'
server: {
port: 3000,
host: true
}
});
`package.json`:
{
"name": "astro-xss-poc-victim",
"version": "0.1.0",
"scripts": {
"dev": "astro dev"
},
"dependencies": {
"astro": "5.15.5"
}
}
Start the development server:
npm install
npm run dev
Access the following malicious URL depending on your configuration:
**For `trailingSlash: 'never'`** (requires trailing slash):
http://localhost:3000/"></code><script>alert(document.domain)</script><!--/
**For `trailingSlash: 'always'`** (no trailing slash):
http://localhost:3000/"></code><script>alert(document.domain)</script><!--
When accessing the malicious URL:
1. The development server returns a 404 page due to trailing slash mismatch
2. The JavaScript payload (`alert(document.domain)`) executes in the browser
3. An alert dialog appears, demonstrating arbitrary code execution
Remote Testing (ngrok)
Reproduce realistic attack scenario via external malicious link
Show details Prerequisites: ngrok account and authtoken configured (`ngrok config add-authtoken `) Setup and Execution:#!/bin/bash
set -e
mkdir -p logs
npm i
npm run dev > ./logs/victim.log 2>&1 &
ngrok http 3000 > ./logs/ngrok.log 2>&1 &
sleep 3
NGROK_URL=$(curl -s http://localhost:4040/api/tunnels | grep -o '"public_url":"https://[^"]*' | head -1 | cut -d'"' -f4)
echo ""
echo "=== Attack URLs ==="
echo ""
echo "For trailingSlash: 'never' (requires trailing slash):"
echo "${NGROK_URL}/\"></code><script>alert(document.domain)</script><!--/"
echo ""
echo "For trailingSlash: 'always' (no trailing slash):"
echo "${NGROK_URL}/\"></code><script>alert(document.domain)</script><!--"
echo ""
wait
When a remote user accesses either of the generated attack URLs:
1. The request is tunneled through ngrok to the local development server
2. The development server returns a 404 page due to trailing slash mismatch
3. The JavaScript payload (`alert(document.domain)`) executes in the user's browser
Both URL patterns work depending on your `trailingSlash` configuration ('never' or 'always').
Impact
This only affects the development server. Risk depends on how and where the dev server is exposed.
Security impact
- Developer environment compromise: Visiting a crafted URL can run arbitrary JS in the developer's browser.
- Session hijacking: Active developer sessions can be stolen if services are open in the browser.
- Local resource access: JS may probe
localhostendpoints or dev tools depending on browser policies. - Supply-chain risk: Malicious packages or CI that start dev servers can widen exposure.
Attack scenarios
- Social engineering: Malicious link sent to a developer triggers the XSS when opened.
- Malicious documentation: Attack URLs embedded in issues, PRs, chat, or docs.
- Dependency/CI abuse: Packages or automation that spawn public dev servers expose many targets.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "astro"
},
"ranges": [
{
"events": [
{
"introduced": "5.2.0"
},
{
"fixed": "5.15.6"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2025-64745"
],
"database_specific": {
"cwe_ids": [
"CWE-79"
],
"github_reviewed": true,
"github_reviewed_at": "2025-11-13T22:38:30Z",
"nvd_published_at": "2025-11-13T21:15:54Z",
"severity": "LOW"
},
"details": "## Summary\n\nA Reflected Cross-Site Scripting (XSS) vulnerability exists in Astro\u0027s development server error pages when the `trailingSlash` configuration option is used. An attacker can inject arbitrary JavaScript code that executes in the victim\u0027s browser context by crafting a malicious URL. While this vulnerability only affects the development server and not production builds, it could be exploited to compromise developer environments through social engineering or malicious links.\n\n## Details\n\n### Vulnerability Location\n\nhttps://github.com/withastro/astro/blob/5bc37fd5cade62f753aef66efdf40f982379029a/packages/astro/src/template/4xx.ts#L133-L149\n\n### Root Cause\n\nThe vulnerability was introduced in commit `536175528` (PR #12994) , as part of a feature to \"redirect trailing slashes on on-demand rendered pages.\" The feature added a helpful 404 error page in development mode to alert developers of trailing slash mismatches.\n\n**Issue**: The `corrected` variable, which is derived from the user-controlled `pathname` parameter, is directly interpolated into the HTML without proper escaping. While the `pathname` variable itself is escaped elsewhere in the same file (line 114: `escape(pathname)`), the `corrected` variable is not sanitized before being inserted into both the `href` attribute and the link text.\n\n### Attack Vector\n\nWhen a developer has configured `trailingSlash` to `\u0027always\u0027` or `\u0027never\u0027` and visits a URL with a mismatched trailing slash, the development server returns a 404 page containing the vulnerable template. An attacker can craft a URL with JavaScript payloads that will be executed when the page is rendered.\n\n## PoC\n\n### Local Testing (localhost)\n\nBasic vulnerability verification in local development environment\n\n\u003cdetails\u003e\n\u003csummary\u003eShow details\u003c/summary\u003e\n\n`astro.config.mjs`:\n```javascript\nimport { defineConfig } from \u0027astro/config\u0027;\n\nexport default defineConfig({\n trailingSlash: \u0027never\u0027, // or \u0027always\u0027\n server: {\n port: 3000,\n host: true\n }\n});\n```\n\n`package.json`:\n```json\n{\n \"name\": \"astro-xss-poc-victim\",\n \"version\": \"0.1.0\",\n \"scripts\": {\n \"dev\": \"astro dev\"\n },\n \"dependencies\": {\n \"astro\": \"5.15.5\"\n }\n}\n```\n\nStart the development server:\n```bash\nnpm install\nnpm run dev\n```\n\nAccess the following malicious URL depending on your configuration:\n\n**For `trailingSlash: \u0027never\u0027`** (requires trailing slash):\n```\nhttp://localhost:3000/\"\u003e\u003c/code\u003e\u003cscript\u003ealert(document.domain)\u003c/script\u003e\u003c!--/\n```\n\n**For `trailingSlash: \u0027always\u0027`** (no trailing slash):\n```\nhttp://localhost:3000/\"\u003e\u003c/code\u003e\u003cscript\u003ealert(document.domain)\u003c/script\u003e\u003c!--\n```\n\nWhen accessing the malicious URL:\n1. The development server returns a 404 page due to trailing slash mismatch\n2. The JavaScript payload (`alert(document.domain)`) executes in the browser\n3. An alert dialog appears, demonstrating arbitrary code execution\n\n\u003c/details\u003e\n\n### Remote Testing (ngrok)\n\nReproduce realistic attack scenario via external malicious link\n\n\u003cdetails\u003e\n\u003csummary\u003eShow details\u003c/summary\u003e\n\nPrerequisites: ngrok account and authtoken configured (`ngrok config add-authtoken \u003ckey\u003e`)\n\nSetup and Execution:\n```bash\n#!/bin/bash\nset -e\n\nmkdir -p logs\n\nnpm i\nnpm run dev \u003e ./logs/victim.log 2\u003e\u00261 \u0026\n\nngrok http 3000 \u003e ./logs/ngrok.log 2\u003e\u00261 \u0026\n\nsleep 3\n\nNGROK_URL=$(curl -s http://localhost:4040/api/tunnels | grep -o \u0027\"public_url\":\"https://[^\"]*\u0027 | head -1 | cut -d\u0027\"\u0027 -f4)\necho \"\"\necho \"=== Attack URLs ===\"\necho \"\"\necho \"For trailingSlash: \u0027never\u0027 (requires trailing slash):\"\necho \"${NGROK_URL}/\\\"\u003e\u003c/code\u003e\u003cscript\u003ealert(document.domain)\u003c/script\u003e\u003c!--/\"\necho \"\"\necho \"For trailingSlash: \u0027always\u0027 (no trailing slash):\"\necho \"${NGROK_URL}/\\\"\u003e\u003c/code\u003e\u003cscript\u003ealert(document.domain)\u003c/script\u003e\u003c!--\"\necho \"\"\nwait\n```\n\nWhen a remote user accesses either of the generated attack URLs:\n1. The request is tunneled through ngrok to the local development server\n2. The development server returns a 404 page due to trailing slash mismatch\n3. The JavaScript payload (`alert(document.domain)`) executes in the user\u0027s browser\n\nBoth URL patterns work depending on your `trailingSlash` configuration (\u0027never\u0027 or \u0027always\u0027).\n\n\u003c/details\u003e\n\n## Impact\n\nThis only affects the **development server**. Risk depends on how and where the dev server is exposed.\n\n### Security impact\n\n* **Developer environment compromise**: Visiting a crafted URL can run arbitrary JS in the developer\u0027s browser.\n* **Session hijacking**: Active developer sessions can be stolen if services are open in the browser.\n* **Local resource access**: JS may probe `localhost` endpoints or dev tools depending on browser policies.\n* **Supply-chain risk**: Malicious packages or CI that start dev servers can widen exposure.\n\n### Attack scenarios\n\n* **Social engineering**: Malicious link sent to a developer triggers the XSS when opened.\n* **Malicious documentation**: Attack URLs embedded in issues, PRs, chat, or docs.\n* **Dependency/CI abuse**: Packages or automation that spawn public dev servers expose many targets.",
"id": "GHSA-w2vj-39qv-7vh7",
"modified": "2025-11-27T08:12:32Z",
"published": "2025-11-13T22:38:30Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/withastro/astro/security/advisories/GHSA-w2vj-39qv-7vh7"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-64745"
},
{
"type": "WEB",
"url": "https://github.com/withastro/astro/pull/12994"
},
{
"type": "WEB",
"url": "https://github.com/withastro/astro/commit/790d9425f39bbbb462f1c27615781cd965009f91"
},
{
"type": "PACKAGE",
"url": "https://github.com/withastro/astro"
},
{
"type": "WEB",
"url": "https://github.com/withastro/astro/blob/5bc37fd5cade62f753aef66efdf40f982379029a/packages/astro/src/template/4xx.ts#L133-L149"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:L/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "Astro development server error page is vulnerable to reflected Cross-site Scripting"
}
GHSA-W2VP-GMJR-X26G
Vulnerability from github – Published: 2024-05-06 03:30 – Updated: 2024-05-06 03:30A vulnerability was found in Campcodes Complete Web-Based School Management System 1.0 and classified as problematic. Affected by this issue is some unknown functionality of the file /view/timetable.php. The manipulation of the argument grade leads to cross site scripting. The attack may be launched remotely. The exploit has been disclosed to the public and may be used. The identifier of this vulnerability is VDB-263120.
{
"affected": [],
"aliases": [
"CVE-2024-4516"
],
"database_specific": {
"cwe_ids": [
"CWE-79"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-05-06T03:15:10Z",
"severity": "MODERATE"
},
"details": "A vulnerability was found in Campcodes Complete Web-Based School Management System 1.0 and classified as problematic. Affected by this issue is some unknown functionality of the file /view/timetable.php. The manipulation of the argument grade leads to cross site scripting. The attack may be launched remotely. The exploit has been disclosed to the public and may be used. The identifier of this vulnerability is VDB-263120.",
"id": "GHSA-w2vp-gmjr-x26g",
"modified": "2024-05-06T03:30:47Z",
"published": "2024-05-06T03:30:47Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-4516"
},
{
"type": "WEB",
"url": "https://github.com/E1CHO/cve_hub/blob/main/Complete%20Web-Based%20School%20Management%20System%20-%20xss/Complete%20Web-Based%20School%20Management%20System%20-%20vuln%204.pdf"
},
{
"type": "WEB",
"url": "https://vuldb.com/?ctiid.263120"
},
{
"type": "WEB",
"url": "https://vuldb.com/?id.263120"
},
{
"type": "WEB",
"url": "https://vuldb.com/?submit.329697"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-W2W2-VVWJ-X9R8
Vulnerability from github – Published: 2022-05-01 17:55 – Updated: 2022-05-01 17:55Multiple cross-site scripting (XSS) vulnerabilities in PHProjekt 5.2.0, when magic_quotes_gpc is disabled, allow remote authenticated users to inject arbitrary web script or HTML via unspecified vectors to the (1) Projects, (2) Contacts, (3) Helpdesk, (4) Search (only Gecko engine driven Browsers), and (5) Notes modules; the (6) Mail summary page; and unspecified other files.
{
"affected": [],
"aliases": [
"CVE-2007-1576"
],
"database_specific": {
"cwe_ids": [
"CWE-79"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2007-03-21T21:19:00Z",
"severity": "MODERATE"
},
"details": "Multiple cross-site scripting (XSS) vulnerabilities in PHProjekt 5.2.0, when magic_quotes_gpc is disabled, allow remote authenticated users to inject arbitrary web script or HTML via unspecified vectors to the (1) Projects, (2) Contacts, (3) Helpdesk, (4) Search (only Gecko engine driven Browsers), and (5) Notes modules; the (6) Mail summary page; and unspecified other files.",
"id": "GHSA-w2w2-vvwj-x9r8",
"modified": "2022-05-01T17:55:05Z",
"published": "2022-05-01T17:55:05Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2007-1576"
},
{
"type": "WEB",
"url": "http://osvdb.org/34064"
},
{
"type": "WEB",
"url": "http://osvdb.org/34065"
},
{
"type": "WEB",
"url": "http://osvdb.org/34066"
},
{
"type": "WEB",
"url": "http://osvdb.org/34067"
},
{
"type": "WEB",
"url": "http://osvdb.org/34068"
},
{
"type": "WEB",
"url": "http://osvdb.org/34069"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/24509"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/25748"
},
{
"type": "WEB",
"url": "http://security.gentoo.org/glsa/glsa-200706-07.xml"
},
{
"type": "WEB",
"url": "http://securityreason.com/securityalert/2459"
},
{
"type": "WEB",
"url": "http://www.nruns.de/security_advisory_phprojekt_xss_and_filter_evasion.php"
},
{
"type": "WEB",
"url": "http://www.phprojekt.com/index.php?name=News\u0026file=article\u0026sid=276"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/462788/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/22957"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-W2W4-2639-F54P
Vulnerability from github – Published: 2023-06-26 06:30 – Updated: 2024-04-04 05:09Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') vulnerability in PI Websolution Conditional cart fee plugin <= 1.0.96 versions.
{
"affected": [],
"aliases": [
"CVE-2023-29093"
],
"database_specific": {
"cwe_ids": [
"CWE-79"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-06-26T06:15:10Z",
"severity": "MODERATE"
},
"details": "Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027) vulnerability in PI Websolution Conditional cart fee plugin \u003c=\u00a01.0.96 versions.",
"id": "GHSA-w2w4-2639-f54p",
"modified": "2024-04-04T05:09:34Z",
"published": "2023-06-26T06:30:27Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-29093"
},
{
"type": "WEB",
"url": "https://patchstack.com/database/vulnerability/conditional-extra-fees-for-woocommerce/wordpress-conditional-extra-fees-for-woocommerce-plugin-1-0-96-cross-site-scripting-xss-vulnerability?_s_id=cve"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:L",
"type": "CVSS_V3"
}
]
}
GHSA-W2W4-FC9R-JGQ5
Vulnerability from github – Published: 2022-05-14 03:56 – Updated: 2022-05-14 03:56Blink in Google Chrome prior to 55.0.2883.75 for Linux and Windows, and 55.0.2883.84 for Android allowed possible corruption of the DOM tree during synchronous event handling, which allowed a remote attacker to inject arbitrary scripts or HTML (UXSS) via a crafted HTML page.
{
"affected": [],
"aliases": [
"CVE-2016-5208"
],
"database_specific": {
"cwe_ids": [
"CWE-79"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2017-01-19T05:59:00Z",
"severity": "MODERATE"
},
"details": "Blink in Google Chrome prior to 55.0.2883.75 for Linux and Windows, and 55.0.2883.84 for Android allowed possible corruption of the DOM tree during synchronous event handling, which allowed a remote attacker to inject arbitrary scripts or HTML (UXSS) via a crafted HTML page.",
"id": "GHSA-w2w4-fc9r-jgq5",
"modified": "2022-05-14T03:56:37Z",
"published": "2022-05-14T03:56:37Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2016-5208"
},
{
"type": "WEB",
"url": "https://chromereleases.googleblog.com/2016/12/stable-channel-update-for-desktop.html"
},
{
"type": "WEB",
"url": "https://crbug.com/658535"
},
{
"type": "WEB",
"url": "https://security.gentoo.org/glsa/201612-11"
},
{
"type": "WEB",
"url": "http://rhn.redhat.com/errata/RHSA-2016-2919.html"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/94633"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-W2W5-W2PW-R929
Vulnerability from github – Published: 2026-07-13 17:22 – Updated: 2026-07-13 17:22Summary
A stored cross-site scripting (XSS) vulnerability exists in NukeViet CMS versions 4.x through 4.5.08. A low-privileged authenticated user can store a JavaScript payload in their profile's display name fields. The payload executes in the browser of any visitor — including administrators — who clicks the Reply ("Answer") link on a comment posted by that user.
Affected Component
The {COMMENT.post_name} template variable is interpolated without JavaScript-context escaping into an inline onclick handler in both comment block positions:
themes/default/modules/comment/comment.tplline 27 (top-level comments)themes/default/modules/comment/comment.tplline 64 (nested/reply comments)
onclick="nv_commment_feedback(event, {COMMENT.cid}, '{COMMENT.post_name}')"
Root Cause
The first_name and last_name profile fields are sanitized with HTML numeric character references (' → ', ( → (, ) → ), / → /) via Request::_get_title() with $specialchars = true. This encoding is correct for plain HTML attribute and element contexts, but insufficient for a JavaScript string literal embedded inside an HTML attribute.
Browsers decode HTML entities in attribute values before the JavaScript engine parses the string. As a result, ' is decoded back to ', which terminates the JS string early and allows the remainder of the value to be executed as JavaScript.
The combined display name (nv_show_name_user(first_name, last_name)) is what reaches the template, giving an attacker up to ~200 encoded characters across both fields — sufficient for any practical payload.
Proof of Concept
Set first_name to the following value in profile settings (/index.php?nv=users&op=editinfo), then post any comment:
a');alert(document.domain);//
The value is stored as a');alert(document.domain);//.
When a visitor clicks the Reply link on the comment, the browser renders:
nv_commment_feedback(event, 1, 'a');alert(document.domain);// Tester')
causing alert(document.domain) to execute in the visitor's browser context.
A data-exfiltration variant (split across both name fields) navigates the victim's browser to an attacker-controlled URL carrying document.cookie as a query parameter. End-to-end verification was performed using a local listener.
Exploitation Conditions (default configuration)
| Condition | Default value | Effect |
|---|---|---|
captcha_area_comm |
1 |
No CAPTCHA for logged-in users — payload delivery requires no CAPTCHA solve |
auto_postcomm |
enabled | Comments are published immediately without moderation |
active_editinfo_censor |
0 |
Profile edits take effect immediately without admin review |
CSP script-src |
'unsafe-inline' |
Inline onclick handlers execute normally |
Any registered member can set the payload and post a comment with no additional steps.
If captcha_area_comm is set to 0, the name field of anonymous comments (modules/comment/funcs/post.php) is processed by the same get_title(..., 1) call, making exploitation possible without authentication.
Impact
An attacker with a regular user account can execute arbitrary JavaScript in the browser of any visitor who interacts with the Reply button on their comment, including site administrators.
Practical consequences include:
- Privilege escalation via admin session hijacking — forging administrative actions (content modification, account manipulation) in the context of an authenticated admin.
- Credential phishing — injecting a fake login form into the page.
- Data exfiltration — reading page content and non-
HttpOnlycookies.
Note: NukeViet session cookies carry the
HttpOnlyflag, so they are not directly readable viadocument.cookie; however, the above attack vectors remain fully viable.
Remediation
Preferred fix: Remove post_name from the inline handler entirely. Pass only cid to nv_commment_feedback and have the function retrieve the display name from the already-rendered DOM (e.g., the adjacent <strong class="cm_item"> element).
Alternative fix: If the value must be passed inline, encode it with json_encode($post_name) (PHP) so that the output is a properly escaped JavaScript string literal, not an HTML-entity-encoded one. HTML numeric character references must not be relied upon for JavaScript string escaping.
As a general note, the result of get_title(..., $specialchars=true) is safe for HTML element content and quoted HTML attribute values, but unsafe when placed inside a JavaScript string literal within an attribute. Other locations in the codebase using the same pattern should be audited.
Resources
- OWASP: Cross Site Scripting Prevention — Rule 2: Attribute Encoding is Not Sufficient for JS Contexts
- CWE-79: Improper Neutralization of Input During Web Page Generation
- CWE-116: Improper Encoding or Escaping of Output
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c 4.5.09"
},
"package": {
"ecosystem": "Packagist",
"name": "nukeviet/nukeviet"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "4.6.00"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-49259"
],
"database_specific": {
"cwe_ids": [
"CWE-79"
],
"github_reviewed": true,
"github_reviewed_at": "2026-07-13T17:22:26Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "## Summary\n\nA stored cross-site scripting (XSS) vulnerability exists in NukeViet CMS versions 4.x through 4.5.08. A low-privileged authenticated user can store a JavaScript payload in their profile\u0027s display name fields. The payload executes in the browser of any visitor \u2014 including administrators \u2014 who clicks the **Reply** (\"Answer\") link on a comment posted by that user.\n\n## Affected Component\n\nThe `{COMMENT.post_name}` template variable is interpolated without JavaScript-context escaping into an inline `onclick` handler in both comment block positions:\n\n- `themes/default/modules/comment/comment.tpl` line 27 (top-level comments)\n- `themes/default/modules/comment/comment.tpl` line 64 (nested/reply comments)\n\n```html\nonclick=\"nv_commment_feedback(event, {COMMENT.cid}, \u0027{COMMENT.post_name}\u0027)\"\n```\n\n## Root Cause\n\nThe `first_name` and `last_name` profile fields are sanitized with HTML numeric character references (`\u0027` \u2192 `\u0026#039;`, `(` \u2192 `\u0026#40;`, `)` \u2192 `\u0026#41;`, `/` \u2192 `\u0026#x002F;`) via `Request::_get_title()` with `$specialchars = true`. This encoding is correct for plain HTML attribute and element contexts, but **insufficient for a JavaScript string literal embedded inside an HTML attribute**.\n\nBrowsers decode HTML entities in attribute values **before** the JavaScript engine parses the string. As a result, `\u0026#039;` is decoded back to `\u0027`, which terminates the JS string early and allows the remainder of the value to be executed as JavaScript.\n\nThe combined display name (`nv_show_name_user(first_name, last_name)`) is what reaches the template, giving an attacker up to ~200 encoded characters across both fields \u2014 sufficient for any practical payload.\n\n## Proof of Concept\n\nSet `first_name` to the following value in profile settings (`/index.php?nv=users\u0026op=editinfo`), then post any comment:\n\n```text\na\u0027);alert(document.domain);//\n```\n\nThe value is stored as `a\u0026#039;\u0026#41;;alert\u0026#40;document.domain\u0026#41;;\u0026#x002F;\u0026#x002F;`.\n\nWhen a visitor clicks the Reply link on the comment, the browser renders:\n\n```js\nnv_commment_feedback(event, 1, \u0027a\u0027);alert(document.domain);// Tester\u0027)\n```\n\ncausing `alert(document.domain)` to execute in the visitor\u0027s browser context.\n\nA data-exfiltration variant (split across both name fields) navigates the victim\u0027s browser to an attacker-controlled URL carrying `document.cookie` as a query parameter. End-to-end verification was performed using a local listener.\n\n## Exploitation Conditions (default configuration)\n\n| Condition | Default value | Effect |\n|---|---|---|\n| `captcha_area_comm` | `1` | No CAPTCHA for logged-in users \u2014 payload delivery requires no CAPTCHA solve |\n| `auto_postcomm` | enabled | Comments are published immediately without moderation |\n| `active_editinfo_censor` | `0` | Profile edits take effect immediately without admin review |\n| CSP `script-src` | `\u0027unsafe-inline\u0027` | Inline `onclick` handlers execute normally |\n\nAny registered member can set the payload and post a comment with no additional steps.\n\nIf `captcha_area_comm` is set to `0`, the `name` field of anonymous comments (`modules/comment/funcs/post.php`) is processed by the same `get_title(..., 1)` call, making exploitation possible without authentication.\n\n## Impact\n\nAn attacker with a regular user account can execute arbitrary JavaScript in the browser of any visitor who interacts with the Reply button on their comment, including site administrators.\n\nPractical consequences include:\n\n- **Privilege escalation via admin session hijacking** \u2014 forging administrative actions (content modification, account manipulation) in the context of an authenticated admin.\n- **Credential phishing** \u2014 injecting a fake login form into the page.\n- **Data exfiltration** \u2014 reading page content and non-`HttpOnly` cookies.\n\n\u003e Note: NukeViet session cookies carry the `HttpOnly` flag, so they are not directly readable via `document.cookie`; however, the above attack vectors remain fully viable.\n\n## Remediation\n\n**Preferred fix:** Remove `post_name` from the inline handler entirely. Pass only `cid` to `nv_commment_feedback` and have the function retrieve the display name from the already-rendered DOM (e.g., the adjacent `\u003cstrong class=\"cm_item\"\u003e` element).\n\n**Alternative fix:** If the value must be passed inline, encode it with `json_encode($post_name)` (PHP) so that the output is a properly escaped JavaScript string literal, not an HTML-entity-encoded one. HTML numeric character references must not be relied upon for JavaScript string escaping.\n\nAs a general note, the result of `get_title(..., $specialchars=true)` is safe for HTML element content and quoted HTML attribute values, but **unsafe when placed inside a JavaScript string literal within an attribute**. Other locations in the codebase using the same pattern should be audited.\n\n## Resources\n\n- OWASP: Cross Site Scripting Prevention \u2014 Rule 2: Attribute Encoding is Not Sufficient for JS Contexts\n- CWE-79: Improper Neutralization of Input During Web Page Generation\n- CWE-116: Improper Encoding or Escaping of Output",
"id": "GHSA-w2w5-w2pw-r929",
"modified": "2026-07-13T17:22:26Z",
"published": "2026-07-13T17:22:26Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/nukeviet/nukeviet/security/advisories/GHSA-w2w5-w2pw-r929"
},
{
"type": "PACKAGE",
"url": "https://github.com/nukeviet/nukeviet"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N",
"type": "CVSS_V3"
}
],
"summary": "NukeViet: Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)"
}
GHSA-W2W6-C746-7P2J
Vulnerability from github – Published: 2022-05-14 01:44 – Updated: 2022-05-14 01:44XSS exists in InfoVista VistaPortal SE Version 5.1 (build 51029). VPortal/mgtconsole/RolePermissions.jsp has reflected XSS via the ConnPoolName parameter.
{
"affected": [],
"aliases": [
"CVE-2018-19649"
],
"database_specific": {
"cwe_ids": [
"CWE-79"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2018-12-17T15:29:00Z",
"severity": "MODERATE"
},
"details": "XSS exists in InfoVista VistaPortal SE Version 5.1 (build 51029). VPortal/mgtconsole/RolePermissions.jsp has reflected XSS via the ConnPoolName parameter.",
"id": "GHSA-w2w6-c746-7p2j",
"modified": "2022-05-14T01:44:00Z",
"published": "2022-05-14T01:44:00Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-19649"
},
{
"type": "WEB",
"url": "http://packetstormsecurity.com/files/150690/VistaPortal-SE-5.1-Cross-Site-Scripting.html"
},
{
"type": "WEB",
"url": "http://seclists.org/fulldisclosure/2018/Dec/20"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-W2W8-WF8J-GRH4
Vulnerability from github – Published: 2024-12-02 18:31 – Updated: 2024-12-02 18:31Sysax Multi Server 6.99 is vulnerable to Cross Site Scripting (XSS) via the /scgi?sid parameter.
{
"affected": [],
"aliases": [
"CVE-2024-53459"
],
"database_specific": {
"cwe_ids": [
"CWE-79"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-12-02T16:15:12Z",
"severity": "MODERATE"
},
"details": "Sysax Multi Server 6.99 is vulnerable to Cross Site Scripting (XSS) via the /scgi?sid parameter.",
"id": "GHSA-w2w8-wf8j-grh4",
"modified": "2024-12-02T18:31:55Z",
"published": "2024-12-02T18:31:55Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-53459"
},
{
"type": "WEB",
"url": "https://packetstormsecurity.com/files/182467/Sysax-Multi-Server-6.99-Cross-Site-Scripting.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N",
"type": "CVSS_V3"
}
]
}
Mitigation MIT-4
Strategy: Libraries or Frameworks
- Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid [REF-1482].
- Examples of libraries and frameworks that make it easier to generate properly encoded output include Microsoft's Anti-XSS library, the OWASP ESAPI Encoding module, and Apache Wicket.
Mitigation
- Understand the context in which your data will be used and the encoding that will be expected. This is especially important when transmitting data between different components, or when generating outputs that can contain multiple encodings at the same time, such as web pages or multi-part mail messages. Study all expected communication protocols and data representations to determine the required encoding strategies.
- For any data that will be output to another web page, especially any data that was received from external inputs, use the appropriate encoding on all non-alphanumeric characters.
- Parts of the same output document may require different encodings, which will vary depending on whether the output is in the:
- etc. Note that HTML Entity Encoding is only appropriate for the HTML body.
- Consult the XSS Prevention Cheat Sheet [REF-724] for more details on the types of encoding and escaping that are needed.
- HTML body
- Element attributes (such as src="XYZ")
- URIs
- JavaScript sections
- Cascading Style Sheets and style property
Mitigation MIT-6
Strategy: Attack Surface Reduction
Understand all the potential areas where untrusted inputs can enter your software: parameters or arguments, cookies, anything read from the network, environment variables, reverse DNS lookups, query results, request headers, URL components, e-mail, files, filenames, databases, and any external systems that provide data to the application. Remember that such inputs may be obtained indirectly through API calls.
Mitigation MIT-15
For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.
Mitigation MIT-27
Strategy: Parameterization
If available, use structured mechanisms that automatically enforce the separation between data and code. These mechanisms may be able to provide the relevant quoting, encoding, and validation automatically, instead of relying on the developer to provide this capability at every point where output is generated.
Mitigation MIT-30.1
Strategy: Output Encoding
- Use and specify an output encoding that can be handled by the downstream component that is reading the output. Common encodings include ISO-8859-1, UTF-7, and UTF-8. When an encoding is not specified, a downstream component may choose a different encoding, either by assuming a default encoding or automatically inferring which encoding is being used, which can be erroneous. When the encodings are inconsistent, the downstream component might treat some character or byte sequences as special, even if they are not special in the original encoding. Attackers might then be able to exploit this discrepancy and conduct injection attacks; they even might be able to bypass protection mechanisms that assume the original encoding is also being used by the downstream component.
- The problem of inconsistent output encodings often arises in web pages. If an encoding is not specified in an HTTP header, web browsers often guess about which encoding is being used. This can open up the browser to subtle XSS attacks.
Mitigation MIT-43
With Struts, write all data from form beans with the bean's filter attribute set to true.
Mitigation MIT-31
Strategy: Attack Surface Reduction
To help mitigate XSS attacks against the user's session cookie, set the session cookie to be HttpOnly. In browsers that support the HttpOnly feature (such as more recent versions of Internet Explorer and Firefox), this attribute can prevent the user's session cookie from being accessible to malicious client-side scripts that use document.cookie. This is not a complete solution, since HttpOnly is not supported by all browsers. More importantly, XmlHttpRequest and other powerful browser technologies provide read access to HTTP headers, including the Set-Cookie header in which the HttpOnly flag is set.
Mitigation MIT-5
Strategy: Input Validation
- Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.
- When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue."
- Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
- When dynamically constructing web pages, use stringent allowlists that limit the character set based on the expected value of the parameter in the request. All input should be validated and cleansed, not just parameters that the user is supposed to specify, but all data in the request, including hidden fields, cookies, headers, the URL itself, and so forth. A common mistake that leads to continuing XSS vulnerabilities is to validate only fields that are expected to be redisplayed by the site. It is common to see data from the request that is reflected by the application server or the application that the development team did not anticipate. Also, a field that is not currently reflected may be used by a future developer. Therefore, validating ALL parts of the HTTP request is recommended.
- Note that proper output encoding, escaping, and quoting is the most effective solution for preventing XSS, although input validation may provide some defense-in-depth. This is because it effectively limits what will appear in output. Input validation will not always prevent XSS, especially if you are required to support free-form text fields that could contain arbitrary characters. For example, in a chat application, the heart emoticon ("<3") would likely pass the validation step, since it is commonly used. However, it cannot be directly inserted into the web page because it contains the "<" character, which would need to be escaped or otherwise handled. In this case, stripping the "<" might reduce the risk of XSS, but it would produce incorrect behavior because the emoticon would not be recorded. This might seem to be a minor inconvenience, but it would be more important in a mathematical forum that wants to represent inequalities.
- Even if you make a mistake in your validation (such as forgetting one out of 100 input fields), appropriate encoding is still likely to protect you from injection-based attacks. As long as it is not done in isolation, input validation is still a useful technique, since it may significantly reduce your attack surface, allow you to detect some attacks, and provide other security benefits that proper encoding does not address.
- Ensure that you perform input validation at well-defined interfaces within the application. This will help protect the application even if a component is reused or moved elsewhere.
Mitigation MIT-21
Strategy: Enforcement by Conversion
When the set of acceptable objects, such as filenames or URLs, is limited or known, create a mapping from a set of fixed input values (such as numeric IDs) to the actual filenames or URLs, and reject all other inputs.
Mitigation MIT-29
Strategy: Firewall
Use an application firewall that can detect attacks against this weakness. It can be beneficial in cases in which the code cannot be fixed (because it is controlled by a third party), as an emergency prevention measure while more comprehensive software assurance measures are applied, or to provide defense in depth [REF-1481].
Mitigation MIT-16
Strategy: Environment Hardening
When using PHP, configure the application so that it does not use register_globals. During implementation, develop the application so that it does not rely on this feature, but be wary of implementing a register_globals emulation that is subject to weaknesses such as CWE-95, CWE-621, and similar issues.
CAPEC-209: XSS Using MIME Type Mismatch
An adversary creates a file with scripting content but where the specified MIME type of the file is such that scripting is not expected. The adversary tricks the victim into accessing a URL that responds with the script file. Some browsers will detect that the specified MIME type of the file does not match the actual type of its content and will automatically switch to using an interpreter for the real content type. If the browser does not invoke script filters before doing this, the adversary's script may run on the target unsanitized, possibly revealing the victim's cookies or executing arbitrary script in their browser.
CAPEC-588: DOM-Based XSS
This type of attack is a form of Cross-Site Scripting (XSS) where a malicious script is inserted into the client-side HTML being parsed by a web browser. Content served by a vulnerable web application includes script code used to manipulate the Document Object Model (DOM). This script code either does not properly validate input, or does not perform proper output encoding, thus creating an opportunity for an adversary to inject a malicious script launch a XSS attack. A key distinction between other XSS attacks and DOM-based attacks is that in other XSS attacks, the malicious script runs when the vulnerable web page is initially loaded, while a DOM-based attack executes sometime after the page loads. Another distinction of DOM-based attacks is that in some cases, the malicious script is never sent to the vulnerable web server at all. An attack like this is guaranteed to bypass any server-side filtering attempts to protect users.
CAPEC-591: Reflected XSS
This type of attack is a form of Cross-Site Scripting (XSS) where a malicious script is "reflected" off a vulnerable web application and then executed by a victim's browser. The process starts with an adversary delivering a malicious script to a victim and convincing the victim to send the script to the vulnerable web application.
CAPEC-592: Stored XSS
An adversary utilizes a form of Cross-site Scripting (XSS) where a malicious script is persistently "stored" within the data storage of a vulnerable web application as valid input.
CAPEC-63: Cross-Site Scripting (XSS)
An adversary embeds malicious scripts in content that will be served to web browsers. The goal of the attack is for the target software, the client-side browser, to execute the script with the users' privilege level. An attack of this type exploits a programs' vulnerabilities that are brought on by allowing remote hosts to execute code and scripts. Web browsers, for example, have some simple security controls in place, but if a remote attacker is allowed to execute scripts (through injecting them in to user-generated content like bulletin boards) then these controls may be bypassed. Further, these attacks are very difficult for an end user to detect.
CAPEC-85: AJAX Footprinting
This attack utilizes the frequent client-server roundtrips in Ajax conversation to scan a system. While Ajax does not open up new vulnerabilities per se, it does optimize them from an attacker point of view. A common first step for an attacker is to footprint the target environment to understand what attacks will work. Since footprinting relies on enumeration, the conversational pattern of rapid, multiple requests and responses that are typical in Ajax applications enable an attacker to look for many vulnerabilities, well-known ports, network locations and so on. The knowledge gained through Ajax fingerprinting can be used to support other attacks, such as XSS.