cym1102 / cym1102/nginxWebUI

Security Issue: There is an XSS vulnerability in the nginxWebUI configuration file validation function

Open
#203 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
2.6k
Forks
391
PR merge metrics
No merged PRs in 30d

Description

Security Issue: There is an XSS vulnerability in the nginxWebUI configuration file validation function
  1. Vulnerability overview
    In the Web management interface of nginxWebUI v4.3.7, the "nginx directory" input box in the "Enable Configuration" module does not strictly filter user input parameters, allowing attackers to inject malicious scripts.

  2. Affected versions
    • Product: nginxWebUI
    • Affected version: v4.3.7 (other versions may also be affected, not tested)
    • Component: Local -> Web Management Interface -> Enable Configuration -> nginx Directory

  3. Detailed description
    When processing the "​​nginxDir​​​" parameter in the "​​/adminPage/conf/check​​" interface, the backend did not perform any HTML encoding or filtering, resulting in the input being stored and rendered on the page as it was entered.

  4. Reproduction steps:
    • Install the test device with NetDevice Manager v3.2.1, and its Web management interface address is ​​http://127.0.0.1:8689​​.
    • Accessing vulnerable endpoints: Log in to any account and directly access ​​http://127.0.0.1:8689/adminPage/conf​​.

• In the "​​nginx directory​​​" input box, enter the following content and press "​​Verify File​​" to submit.
<script>alert('xss')</script>
• Screenshot 1: Input the payload <script>alert('xss')</script> in the nginx directory input box
Image

• Screenshot 2: Request packet and response packet.
Image

  1. Potential impacts
    An attacker can steal user session cookies, hijack accounts, or spread malicious content.

  2. Repair suggestions
    Perform strict output encoding (such as HTML encoding) on all user inputs, or utilize Content Security Policy (CSP).

Security Issue: nginxWebUI配置文件校验存在XSS漏洞
  1. 漏洞概览
    在nginxWebUI v4.3.7的Web管理界面中,“启用配置”模块的“nginx目录”输入框对用户输入参数过滤不严,导致攻击者能够注入恶意脚本。

  2. 受影响的版本
    • 产品: nginxWebUI
    • 受影响版本: v4.3.7(其他版本可能同样受影响,未测试)
    • 组件: 本地 -> Web管理界面 -> 启用配置 -> nginx目录

  3. 详细描述
    ​​/adminPage/conf/check​​ 接口在处理​​nginxDir​​参数时,后端未进行任何HTML编码或过滤,导致输入被原样存储并渲染在页面中。

  4. ​复现步骤:
    • 安装 NetDevice Manager v3.2.1 的测试设备,其Web管理界面地址为 ​​http://127.0.0.1:8689​​。
    • 访问漏洞端点:登录任意账户,直接访问 ​​http://127.0.0.1:8689/adminPage/conf​​。
    • 在​​nginx目录​​​输入框内,输入以下内容并按“​​校验文件​​”提交。
    <script>alert('xss')</script>
    • 截图1:在nginx目录输入框里输入payload ​​<script>alert('xss')</script>​​

Image

• 截图2:请求包和响应包。
Image

  1. ​潜在影响
    攻击者可窃取用户会话Cookie,进行账户劫持,或传播恶意内容。

  2. 修复建议
    对所有用户输入进行严格的输出编码(如HTML编码),或使用内容安全策略(CSP)。

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the /adminPage/conf/check endpoint and its nginxDir parameter from the Web management interface at /adminPage/conf. Reproduce the reported script payload, then identify where the value is rendered; done means the input no longer executes as HTML or script in the interface.

Written by the indexing model from the issue text.

Assessment

Tech stack
html, java
Domain
backend, frontend, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.