# File Upload Types by WPForms <= 1.5.0 - Authenticated (Author+) Stored Cross-Site Scripting via Malformed Type Declaration in Uploaded SVG and HTML Files

- **ID:** WPSEC-2026-4426
- **Plugin:** File Upload Types by WPForms (`file-upload-types`), https://wordpress.org/plugins/file-upload-types/
- **Affected versions:** from 1.5.0 before 1.6.0
- **Fixed in:** 1.6.0 (Update to 1.6.0 or later.)
- **Severity:** Medium 6.4 (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N)
- **Weakness:** CWE-79
- **Usage among sites WPSec scans:** plugin Low, affected versions Low (as of 2026-12-03)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/file-upload-types
- **Fix released:** 2026-12-01
- **Published:** 2026-12-03
- **URL:** https://wpsec.com/vuln/WPSEC-2026-4426/

## Description

The File Upload Types by WPForms plugin for WordPress is vulnerable to Stored Cross-Site Scripting via uploaded SVG and HTML files in all versions up to, and including, 1.5.0, due to improper detection of the XML/DOCTYPE type declaration during file sanitization. The plugin accepted '<?xml' or '<!DOCTYPE' anywhere in the file. It then took everything from the start of the file up to the first closing marker as the declaration and prepended it, unsanitized, to the kses-filtered content, so markup placed before the declaration survived sanitization. This makes it possible for authenticated attackers, with Author-level access and above, to inject arbitrary web scripts that execute whenever a user accesses the uploaded file, on sites where SVG or HTML uploads are enabled.

## References

- https://wpsec.com/vuln/WPSEC-2026-4426/
- https://plugins.svn.wordpress.org/file-upload-types/tags/1.6.0/
- https://wordpress.org/plugins/file-upload-types/

Source: WPSec, https://wpsec.com/vuln/WPSEC-2026-4426/

License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Free to use, share and adapt, also commercially, if you credit WPSec and link to this advisory.
