Common Weakness Enumeration

CWE-434

Allowed

Unrestricted Upload of File with Dangerous Type

Abstraction: Base · Status: Draft

The product allows the upload or transfer of dangerous file types that are automatically processed within its environment.

6009 vulnerabilities reference this CWE, most recent first.

GHSA-9MQM-JFH7-77GM

Vulnerability from github – Published: 2022-05-13 01:36 – Updated: 2022-05-13 01:36
VLAI
Details

The dotCMS administration panel, versions 3.7.1 and earlier, "Push Publishing" feature in Enterprise Pro is vulnerable to arbitrary file upload. When "Bundle" tar.gz archives uploaded to the Push Publishing feature are decompressed, there are no checks on the types of files which the bundle contains. This vulnerability combined with the path traversal vulnerability (CVE-2017-3188) can lead to remote command execution with the permissions of the user running the dotCMS application. An unauthenticated remote attacker may perform actions with the dotCMS administrator panel with the same permissions of a victim user or execute arbitrary system commands with the permissions of the user running the dotCMS application.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2017-3189"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-434"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2018-07-24T15:29:00Z",
    "severity": "HIGH"
  },
  "details": "The dotCMS administration panel, versions 3.7.1 and earlier, \"Push Publishing\" feature in Enterprise Pro is vulnerable to arbitrary file upload. When \"Bundle\" tar.gz archives uploaded to the Push Publishing feature are decompressed, there are no checks on the types of files which the bundle contains. This vulnerability combined with the path traversal vulnerability (CVE-2017-3188) can lead to remote command execution with the permissions of the user running the dotCMS application. An unauthenticated remote attacker may perform actions with the dotCMS administrator panel with the same permissions of a victim user or execute arbitrary system commands with the permissions of the user running the dotCMS application.",
  "id": "GHSA-9mqm-jfh7-77gm",
  "modified": "2022-05-13T01:36:44Z",
  "published": "2022-05-13T01:36:44Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2017-3189"
    },
    {
      "type": "WEB",
      "url": "https://www.kb.cert.org/vuls/id/168699"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/bid/96616"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-9MVG-C5P5-Q5F5

Vulnerability from github – Published: 2026-01-08 03:30 – Updated: 2026-01-08 03:30
VLAI
Details

The WP Cost Estimation plugin for WordPress is vulnerable to arbitrary file uploads and deletion due to missing file type validation in the lfb_upload_form and lfb_removeFile AJAX actions in versions up to, and including, 9.642. This makes it possible for unauthenticated attackers to upload arbitrary files on the affected sites server which may make remote code execution possible. Additionally, the attacker can also delete files on the server such as database configuration files, subsequently uploading their own database files.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2019-25296"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-434"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-01-08T03:15:41Z",
    "severity": "CRITICAL"
  },
  "details": "The WP Cost Estimation plugin for WordPress is vulnerable to arbitrary file uploads and deletion due to missing file type validation in the lfb_upload_form and lfb_removeFile AJAX actions in versions up to, and including, 9.642. This makes it possible for unauthenticated attackers to upload arbitrary files on the affected sites server which may make remote code execution possible. Additionally, the attacker can also delete files on the server such as database configuration files, subsequently uploading their own database files.",
  "id": "GHSA-9mvg-c5p5-q5f5",
  "modified": "2026-01-08T03:30:23Z",
  "published": "2026-01-08T03:30:23Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2019-25296"
    },
    {
      "type": "WEB",
      "url": "https://wpscan.com/vulnerability/9219"
    },
    {
      "type": "WEB",
      "url": "https://www.acunetix.com/vulnerabilities/web/wordpress-plugin-wp-cost-estimation-payment-forms-builder-multiple-vulnerabilities-9-642"
    },
    {
      "type": "WEB",
      "url": "https://www.wordfence.com/blog/2019/02/vulnerabilities-patched-in-wp-cost-estimation-plugin"
    },
    {
      "type": "WEB",
      "url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/ae50aa5d-95e3-4650-9dbf-118b4ba3abda?source=cve"
    },
    {
      "type": "WEB",
      "url": "https://www.zdnet.com/article/another-wordpress-commercial-plugin-gets-exploited-in-the-wild"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-9P2G-J2PW-QG9P

Vulnerability from github – Published: 2024-02-20 18:30 – Updated: 2024-08-29 21:31
VLAI
Details

An arbitrary file upload vulnerability in the component /sysFile/upload of Novel-Plus v4.3.0-RC1 allows attackers to execute arbitrary code via uploading a crafted file.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2024-25274"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-434"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2024-02-20T16:15:10Z",
    "severity": "CRITICAL"
  },
  "details": "An arbitrary file upload vulnerability in the component /sysFile/upload of Novel-Plus v4.3.0-RC1 allows attackers to execute arbitrary code via uploading a crafted file.",
  "id": "GHSA-9p2g-j2pw-qg9p",
  "modified": "2024-08-29T21:31:01Z",
  "published": "2024-02-20T18:30:34Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-25274"
    },
    {
      "type": "WEB",
      "url": "https://gist.github.com/capable-Hub/725c294f1aeac729fa314a32fef55d5a"
    },
    {
      "type": "WEB",
      "url": "https://reference1.example.com/login"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-9P5F-8C7X-7C7J

Vulnerability from github – Published: 2024-03-20 15:32 – Updated: 2024-03-20 15:32
VLAI
Details

A vulnerability was found in SourceCodester Online Discussion Forum Site 1.0. It has been classified as critical. Affected is an unknown function of the file /uupdate.php. The manipulation of the argument ima leads to unrestricted upload. It is possible to launch the attack remotely. The exploit has been disclosed to the public and may be used. The identifier of this vulnerability is VDB-257388.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2024-2690"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-434"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2024-03-20T10:15:11Z",
    "severity": "MODERATE"
  },
  "details": "A vulnerability was found in SourceCodester Online Discussion Forum Site 1.0. It has been classified as critical. Affected is an unknown function of the file /uupdate.php. The manipulation of the argument ima leads to unrestricted upload. It is possible to launch the attack remotely. The exploit has been disclosed to the public and may be used. The identifier of this vulnerability is VDB-257388.",
  "id": "GHSA-9p5f-8c7x-7c7j",
  "modified": "2024-03-20T15:32:56Z",
  "published": "2024-03-20T15:32:56Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-2690"
    },
    {
      "type": "WEB",
      "url": "https://github.com/wkeyi0x1/vul-report/issues/2"
    },
    {
      "type": "WEB",
      "url": "https://vuldb.com/?ctiid.257388"
    },
    {
      "type": "WEB",
      "url": "https://vuldb.com/?id.257388"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-9P78-P88V-474W

Vulnerability from github – Published: 2026-03-19 09:30 – Updated: 2026-04-01 18:36
VLAI
Details

Unrestricted Upload of File with Dangerous Type vulnerability in Syarif Mobile App Editor allows Upload a Web Shell to a Web Server.This issue affects Mobile App Editor: from n/a through 1.3.1.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-27067"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-434"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-03-19T09:16:17Z",
    "severity": "CRITICAL"
  },
  "details": "Unrestricted Upload of File with Dangerous Type vulnerability in Syarif Mobile App Editor allows Upload a Web Shell to a Web Server.This issue affects Mobile App Editor: from n/a through 1.3.1.",
  "id": "GHSA-9p78-p88v-474w",
  "modified": "2026-04-01T18:36:32Z",
  "published": "2026-03-19T09:30:19Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-27067"
    },
    {
      "type": "WEB",
      "url": "https://patchstack.com/database/wordpress/plugin/mobile-app-editor/vulnerability/wordpress-mobile-app-editor-plugin-1-3-1-arbitrary-file-upload-vulnerability?_s_id=cve"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-9P85-R5R3-72XV

Vulnerability from github – Published: 2023-04-01 00:30 – Updated: 2023-04-06 21:30
VLAI
Details

Generex UPS CS141 below 2.06 version, could allow a remote attacker to upload a firmware file containing a webshell that could allow him to execute arbitrary code as root.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2022-47190"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-434"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2023-03-31T22:15:00Z",
    "severity": "CRITICAL"
  },
  "details": "Generex UPS CS141 below 2.06 version, could allow a remote attacker to upload a firmware file containing a webshell that could allow him to execute arbitrary code as root.",
  "id": "GHSA-9p85-r5r3-72xv",
  "modified": "2023-04-06T21:30:20Z",
  "published": "2023-04-01T00:30:16Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2022-47190"
    },
    {
      "type": "WEB",
      "url": "https://www.generex.de/support/changelogs/cs141/2-12"
    },
    {
      "type": "WEB",
      "url": "https://www.generex.de/support/changelogs/cs141/page:2"
    },
    {
      "type": "WEB",
      "url": "https://www.incibe-cert.es/en/early-warning/ics-advisories/update-03032023-multiple-vulnerabilities-generex-ups-cs141"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-9PC4-3P8J-XQ5V

Vulnerability from github – Published: 2022-01-07 00:00 – Updated: 2022-01-14 00:03
VLAI
Details

An Unrestricted File Upload vulnerability exists in Sourcecodester Vehicle Service Management System 1.0. A remote attacker can upload malicious files leading to a Stored Cross-Site Scripting vulnerability.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2021-46078"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-434"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2022-01-06T16:15:00Z",
    "severity": "MODERATE"
  },
  "details": "An Unrestricted File Upload vulnerability exists in Sourcecodester Vehicle Service Management System 1.0. A remote attacker can upload malicious files leading to a Stored Cross-Site Scripting vulnerability.",
  "id": "GHSA-9pc4-3p8j-xq5v",
  "modified": "2022-01-14T00:03:03Z",
  "published": "2022-01-07T00:00:34Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2021-46078"
    },
    {
      "type": "WEB",
      "url": "https://github.com/plsanu/Vehicle-Service-Management-System-Multiple-File-upload-Leads-to-Stored-Cross-Site-Scripting"
    },
    {
      "type": "WEB",
      "url": "https://www.plsanu.com/vehicle-service-management-system-multiple-file-upload-leads-to-stored-cross-site-scripting"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-9PGH-J74G-QJ6M

Vulnerability from github – Published: 2026-05-08 22:38 – Updated: 2026-05-19 15:57
VLAI
Summary
Open WebUI Vulnerable to Arbitrary File Upload and Path Traversal
Details

CONFIDENTIAL

KL-CAN-2024-002

Vulnerability Details

# Field Value
1 Discoverer Jaggar Henry & Sean Segreti of KoreLogic, Inc.
2 Date Submitted 2024.03.12
3 Title Open WebUI Arbitrary File Upload + Path Traversal
5 Affected Vendor Open WebUI
6 Affected Product(s) Open WebUI (Formerly Ollama WebUI)
7 Affected Version(s) 0.1.105
8 Platform/OS Debian GNU/Linux 12 (bookworm)
9 Vector HTTP web interface
10 CWE CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), CWE-434: Unrestricted Upload of File with Dangerous Type

4. High-level Summary

Attacker controlled files can be uploaded to arbitrary locations on the web server's filesystem by abusing a path traversal vulnerability.


11. Technical Analysis

When attaching files to a prompt by clicking the plus sign (+) on the left of the message input box when using the Open WebUI HTTP interface, the file is uploaded to a static upload directory.

The name of the file is derived from the original HTTP upload request and is not validated or sanitized. This allows for users to upload files with names containing dot-segments in the file path and traverse out of the intended uploads directory. Effectively, users can upload files anywhere on the filesystem the user running the web server has permission.

This can be visualized by examining the python code for the /rag/api/v1/doc API route:

@app.post("/doc")
def store_doc(
    collection_name: Optional[str] = Form(None),
    file: UploadFile = File(...),
    user=Depends(get_current_user),
):
    # "https://www.gutenberg.org/files/1727/1727-h/1727-h.htm"

    print(file.content_type)
    try:
        filename = file.filename
        file_path = f"{UPLOAD_DIR}/{filename}"
        contents = file.file.read()
        with open(file_path, "wb") as f:
            f.write(contents)
            f.close()

The file variable is a representation of the multipart form data contained within the HTTP POST request. The filename variable is derived from the uploaded file name and is not validated before writing the file contents to disk.

This can be used to upload malicious models. These models are often distributed as pickled python objects and can be leveraged to execute arbitrary python bytecode once deserialized. Alternatively, an attacker can leverage existing services, such as SSH, to upload an attacker controlled authorized_keys file to remotely connect to the machine.


12. Proof-of-Concept

Execute the following cURL command:

TARGET_URI='https://redacted.com'; JWT='redacted'; LOCAL_FILE='/tmp/file_to_upload.txt'\
curl -H "Authorization: Bearer $JWT" -F "file=$LOCAL_FILE;filename=../../../../../../../../../../tmp/pwned.txt" "$TARGET_URI/rag/api/v1/doc"

Verify the file pwned.txt exists in the /tmp/ directory on the machine hosting the web server:

ollama@webserver:~$ cat /tmp/pwned.txt 
korelogic
ollama@webserver:~$
Show details on source website

{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 0.1.123"
      },
      "package": {
        "ecosystem": "PyPI",
        "name": "open-webui"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0.1.124"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-44566"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-22",
      "CWE-434"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-05-08T22:38:09Z",
    "nvd_published_at": "2026-05-15T22:16:52Z",
    "severity": "HIGH"
  },
  "details": "# **CONFIDENTIAL**\n\n# KL-CAN-2024-002\n\n## Vulnerability Details\n\n| # | Field | Value |\n|---|-------|-------|\n| 1 | **Discoverer** | Jaggar Henry \u0026 Sean Segreti of KoreLogic, Inc. |\n| 2 | **Date Submitted** | 2024.03.12 |\n| 3 | **Title** | Open WebUI Arbitrary File Upload + Path Traversal |\n| 5 | **Affected Vendor** | Open WebUI |\n| 6 | **Affected Product(s)** | Open WebUI (Formerly Ollama WebUI) |\n| 7 | **Affected Version(s)** | 0.1.105 |\n| 8 | **Platform/OS** | Debian GNU/Linux 12 (bookworm) |\n| 9 | **Vector** | HTTP web interface |\n| 10 | **CWE** | CWE-22: Improper Limitation of a Pathname to a Restricted Directory (\u0027Path Traversal\u0027), CWE-434: Unrestricted Upload of File with Dangerous Type |\n\n---\n\n## 4. High-level Summary\n\nAttacker controlled files can be uploaded to arbitrary locations on the web server\u0027s filesystem by abusing a path traversal vulnerability.\n\n---\n\n## 11. Technical Analysis\n\nWhen attaching files to a prompt by clicking the plus sign (+) on the left of the message input box when using the Open WebUI HTTP interface, the file is uploaded to a static upload directory.\n\nThe name of the file is derived from the original HTTP upload request and is not validated or sanitized. This allows for users to upload files with names containing dot-segments in the file path and traverse out of the intended uploads directory. Effectively, users can upload files anywhere on the filesystem the user running the web server has permission.\n\nThis can be visualized by examining the python code for the `/rag/api/v1/doc` API route:\n\n```python\n@app.post(\"/doc\")\ndef store_doc(\n    collection_name: Optional[str] = Form(None),\n    file: UploadFile = File(...),\n    user=Depends(get_current_user),\n):\n    # \"https://www.gutenberg.org/files/1727/1727-h/1727-h.htm\"\n\n    print(file.content_type)\n    try:\n        filename = file.filename\n        file_path = f\"{UPLOAD_DIR}/{filename}\"\n        contents = file.file.read()\n        with open(file_path, \"wb\") as f:\n            f.write(contents)\n            f.close()\n```\n\nThe `file` variable is a representation of the multipart form data contained within the HTTP POST request. The `filename` variable is derived from the uploaded file name and is not validated before writing the file contents to disk.\n\nThis can be used to upload malicious models. These models are often distributed as pickled python objects and can be leveraged to execute arbitrary python bytecode once deserialized. Alternatively, an attacker can leverage existing services, such as SSH, to upload an attacker controlled `authorized_keys` file to remotely connect to the machine.\n\n---\n\n## 12. Proof-of-Concept\n\nExecute the following cURL command:\n\n```bash\nTARGET_URI=\u0027https://redacted.com\u0027; JWT=\u0027redacted\u0027; LOCAL_FILE=\u0027/tmp/file_to_upload.txt\u0027\\\ncurl -H \"Authorization: Bearer $JWT\" -F \"file=$LOCAL_FILE;filename=../../../../../../../../../../tmp/pwned.txt\" \"$TARGET_URI/rag/api/v1/doc\"\n```\n\nVerify the file `pwned.txt` exists in the `/tmp/` directory on the machine hosting the web server:\n\n```console\nollama@webserver:~$ cat /tmp/pwned.txt \nkorelogic\nollama@webserver:~$\n```",
  "id": "GHSA-9pgh-j74g-qj6m",
  "modified": "2026-05-19T15:57:30Z",
  "published": "2026-05-08T22:38:09Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/open-webui/open-webui/security/advisories/GHSA-9pgh-j74g-qj6m"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-44566"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/open-webui/open-webui"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Open WebUI Vulnerable to Arbitrary File Upload and Path Traversal"
}

GHSA-9PR4-RF97-79QH

Vulnerability from github – Published: 2026-04-13 19:23 – Updated: 2026-04-24 20:37
VLAI
Summary
Note Mark has Stored XSS via Unrestricted Asset Upload
Details

Summary

A stored same-origin XSS vulnerability allows any authenticated user to upload an HTML, SVG, or XHTML file as a note asset and have it executed in a victim’s browser under the application’s origin. Because the application serves these files inline without a safe content type and without nosniff, browsers can sniff and render active content, giving the attacker access to authenticated Note Mark API actions as the victim.

Details

This issue results from three compounding flaws in the asset handling and delivery path.

1. Asset delivery can be used as an attack vector

The asset delivery route can be used to deliver attacker-controlled uploaded content directly to a victim by URL.

Relevant route: - handlers/assets.go:40

huma.Get(api, "/api/notes/{noteID}/assets/{assetID}", h.GetNoteAssetContentByID)

This makes the uploaded asset reachable by direct navigation, which provides the delivery mechanism for the payload.

2. Text-based active content is served with an empty Content-Type

The asset handler relies on h2non/filetype for content-type detection:

  • handlers/assets.go:147
kind, _ := filetype.Match(buf)
if kind != filetype.Unknown {
    contentType = kind.MIME.Value
}

The detection library uses magic-byte matching and does not identify text-based formats such as HTML, SVG, JavaScript, XML, or XHTML. For those files, filetype.Match returns Unknown, leaving Content-Type unset or empty.

As a result, uploaded active content is served without an authoritative MIME type.

3. Files are rendered inline and sniffed by the browser

The asset response is sent with inline disposition:

  • handlers/assets.go:153
w.Header().Set("Content-Disposition", fmt.Sprintf("inline; filename=\"%s\"", asset.Name))

At the same time, the response does not set:

X-Content-Type-Options: nosniff

This combination is dangerous: - the uploaded file contains attacker-controlled active markup - the browser is instructed to render it inline - the response does not provide a trustworthy content type - content sniffing is not disabled

Under these conditions, browsers may detect HTML or SVG content and execute embedded JavaScript. Because the asset is served from the application’s own origin, the script runs with same-origin access to the application and its authenticated APIs.

This turns an uploaded asset into a stored XSS payload that executes when a victim opens the asset URL.

PoC

The issue can be reproduced by uploading a text-based active content file such as HTML or SVG as a note asset, then opening the served asset URL in a browser and observing that script executes in the context of the application origin.

Impact

  • Type: Stored same-origin cross-site scripting (XSS)
  • Who is impacted: Any user who can be induced to open a malicious asset URL, and any deployment allowing asset uploads
  • Security impact: An attacker can execute JavaScript in the victim’s authenticated application context, allowing access to private notes, books, profile data, and authenticated API actions
  • Privileges required: A valid low-privilege user account capable of uploading note assets
  • User interaction: Required, because the victim must navigate to the malicious asset URL
  • Scope: Changed, because attacker-controlled content executes in the victim’s origin and impacts other users rather than remaining confined to the attacker’s own account
Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Go",
        "name": "github.com/enchant97/note-mark/backend"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0.0.0-20260411145018-6bb62842ccb9"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-40262"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-434",
      "CWE-79"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-04-13T19:23:08Z",
    "nvd_published_at": "2026-04-17T01:17:39Z",
    "severity": "HIGH"
  },
  "details": "### Summary\nA stored same-origin XSS vulnerability allows any authenticated user to upload an HTML, SVG, or XHTML file as a note asset and have it executed in a victim\u2019s browser under the application\u2019s origin. Because the application serves these files inline without a safe content type and without `nosniff`, browsers can sniff and render active content, giving the attacker access to authenticated Note Mark API actions as the victim.\n\n### Details\nThis issue results from three compounding flaws in the asset handling and delivery path.\n\n#### 1. Asset delivery can be used as an attack vector\nThe asset delivery route can be used to deliver attacker-controlled uploaded content directly to a victim by URL.\n\nRelevant route:\n- `handlers/assets.go:40`\n\n```go\nhuma.Get(api, \"/api/notes/{noteID}/assets/{assetID}\", h.GetNoteAssetContentByID)\n```\n\nThis makes the uploaded asset reachable by direct navigation, which provides the delivery mechanism for the payload.\n\n#### 2. Text-based active content is served with an empty `Content-Type`\nThe asset handler relies on `h2non/filetype` for content-type detection:\n\n- `handlers/assets.go:147`\n\n```go\nkind, _ := filetype.Match(buf)\nif kind != filetype.Unknown {\n    contentType = kind.MIME.Value\n}\n```\n\nThe detection library uses magic-byte matching and does not identify text-based formats such as HTML, SVG, JavaScript, XML, or XHTML. For those files, `filetype.Match` returns `Unknown`, leaving `Content-Type` unset or empty.\n\nAs a result, uploaded active content is served without an authoritative MIME type.\n\n#### 3. Files are rendered inline and sniffed by the browser\nThe asset response is sent with inline disposition:\n\n- `handlers/assets.go:153`\n\n```go\nw.Header().Set(\"Content-Disposition\", fmt.Sprintf(\"inline; filename=\\\"%s\\\"\", asset.Name))\n```\n\nAt the same time, the response does not set:\n\n```http\nX-Content-Type-Options: nosniff\n```\n\nThis combination is dangerous:\n- the uploaded file contains attacker-controlled active markup\n- the browser is instructed to render it inline\n- the response does not provide a trustworthy content type\n- content sniffing is not disabled\n\nUnder these conditions, browsers may detect HTML or SVG content and execute embedded JavaScript. Because the asset is served from the application\u2019s own origin, the script runs with same-origin access to the application and its authenticated APIs.\n\nThis turns an uploaded asset into a stored XSS payload that executes when a victim opens the asset URL.\n\n### PoC\nThe issue can be reproduced by uploading a text-based active content file such as HTML or SVG as a note asset, then opening the served asset URL in a browser and observing that script executes in the context of the application origin.\n\n### Impact\n- **Type:** Stored same-origin cross-site scripting (XSS)\n- **Who is impacted:** Any user who can be induced to open a malicious asset URL, and any deployment allowing asset uploads\n- **Security impact:** An attacker can execute JavaScript in the victim\u2019s authenticated application context, allowing access to private notes, books, profile data, and authenticated API actions\n- **Privileges required:** A valid low-privilege user account capable of uploading note assets\n- **User interaction:** Required, because the victim must navigate to the malicious asset URL\n- **Scope:** Changed, because attacker-controlled content executes in the victim\u2019s origin and impacts other users rather than remaining confined to the attacker\u2019s own account",
  "id": "GHSA-9pr4-rf97-79qh",
  "modified": "2026-04-24T20:37:42Z",
  "published": "2026-04-13T19:23:08Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/enchant97/note-mark/security/advisories/GHSA-9pr4-rf97-79qh"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-40262"
    },
    {
      "type": "WEB",
      "url": "https://github.com/enchant97/note-mark/commit/6bb62842ccb956870b9bf183629eba95e326e5e3"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/enchant97/note-mark"
    },
    {
      "type": "WEB",
      "url": "https://github.com/enchant97/note-mark/releases/tag/v0.19.2"
    }
  ],
  "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": "Note Mark has Stored XSS via Unrestricted Asset Upload"
}

GHSA-9PR6-9RP3-FQ9V

Vulnerability from github – Published: 2025-07-23 15:31 – Updated: 2025-07-23 15:31
VLAI
Details

An authenticated arbitrary file upload vulnerability exists in the SMA 100 series web management interface. A remote attacker with administrative privileges can exploit this flaw to upload arbitrary files to the system, potentially leading to remote code execution.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2025-40599"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-434"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2025-07-23T14:15:33Z",
    "severity": "CRITICAL"
  },
  "details": "An authenticated arbitrary file upload vulnerability exists in the SMA 100 series web management interface. A remote attacker with administrative privileges can exploit this flaw to upload arbitrary files to the system, potentially leading to remote code execution.",
  "id": "GHSA-9pr6-9rp3-fq9v",
  "modified": "2025-07-23T15:31:13Z",
  "published": "2025-07-23T15:31:13Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-40599"
    },
    {
      "type": "WEB",
      "url": "https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2025-0014"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}

Mitigation
Architecture and Design

Generate a new, unique filename for an uploaded file instead of using the user-supplied filename, so that no external input is used at all.[REF-422] [REF-423]

Mitigation MIT-21
Architecture and Design

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
Architecture and Design

Consider storing the uploaded files outside of the web document root entirely. Then, use other mechanisms to deliver the files dynamically. [REF-423]

Mitigation MIT-5
Implementation

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.
  • For example, limiting filenames to alphanumeric characters can help to restrict the introduction of unintended file extensions.
Mitigation
Architecture and Design

Define a very limited set of allowable extensions and only generate filenames that end in these extensions. Consider the possibility of XSS (CWE-79) before allowing .html or .htm file types.

Mitigation
Implementation

Strategy: Input Validation

Ensure that only one extension is used in the filename. Some web servers, including some versions of Apache, may process files based on inner extensions so that "filename.php.gif" is fed to the PHP interpreter.[REF-422] [REF-423]

Mitigation
Implementation

When running on a web server that supports case-insensitive filenames, perform case-insensitive evaluations of the extensions that are provided.

Mitigation MIT-15
Architecture and Design

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
Implementation

Do not rely exclusively on sanity checks of file contents to ensure that the file is of the expected type and size. It may be possible for an attacker to hide code in some file segments that will still be executed by the server. For example, GIF images may contain a free-form comments field.

Mitigation
Implementation

Do not rely exclusively on the MIME content type or filename attribute when determining how to render a file. Validating the MIME content type and ensuring that it matches the extension is only a partial solution.

Mitigation MIT-17
Architecture and Design Operation

Strategy: Environment Hardening

Run your code using the lowest privileges that are required to accomplish the necessary tasks [REF-76]. If possible, create isolated accounts with limited privileges that are only used for a single task. That way, a successful attack will not immediately give the attacker access to the rest of the software or its environment. For example, database applications rarely need to run as the database administrator, especially in day-to-day operations.

Mitigation MIT-22
Architecture and Design Operation

Strategy: Sandbox or Jail

  • Run the code in a "jail" or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict which files can be accessed in a particular directory or which commands can be executed by the software.
  • OS-level examples include the Unix chroot jail, AppArmor, and SELinux. In general, managed code may provide some protection. For example, java.io.FilePermission in the Java SecurityManager allows the software to specify restrictions on file operations.
  • This may not be a feasible solution, and it only limits the impact to the operating system; the rest of the application may still be subject to compromise.
  • Be careful to avoid CWE-243 and other weaknesses related to jails.
CAPEC-1: Accessing Functionality Not Properly Constrained by ACLs

In applications, particularly web applications, access to functionality is mitigated by an authorization framework. This framework maps Access Control Lists (ACLs) to elements of the application's functionality; particularly URL's for web apps. In the case that the administrator failed to specify an ACL for a particular element, an attacker may be able to access it with impunity. An attacker with the ability to access functionality not properly constrained by ACLs can obtain sensitive information and possibly compromise the entire application. Such an attacker can access resources that must be available only to users at a higher privilege level, can access management sections of the application, or can run queries for data that they otherwise not supposed to.