# Document Embedder – let visitors read files without downloading <= 2.4.0 - Authenticated (Contributor+) Stored Cross-Site Scripting via Document Library File URLs

- **ID:** WPSEC-2026-1211
- **Plugin:** Document Embedder – let visitors read files without downloading (`document-emberdder`), https://wordpress.org/plugins/document-emberdder/
- **Affected versions:** from 2.0.0 before 2.4.1
- **Fixed in:** 2.4.1 (Update to 2.4.1 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-10-18)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/document-emberdder
- **Fix released:** 2026-10-17
- **Published:** 2026-10-18
- **URL:** https://wpsec.com/vuln/WPSEC-2026-1211/

## Description

The Document Embedder plugin for WordPress is vulnerable to Stored Cross-Site Scripting via document library file URLs in all versions up to, and including, 2.4.0, due to insufficient sanitization of URL values saved through the 'bplde_save_document_library' AJAX action. Values such as 'javascript:' URLs fail URL validation and are then stored through sanitize_text_field, which leaves them intact. The front-end library viewer later uses them as download link hrefs and iframe sources without checking the scheme. This makes it possible for authenticated attackers, with contributor-level access and above, to inject scripts that execute when a user views a document library or clicks a document's view or download link.

## References

- https://wpsec.com/vuln/WPSEC-2026-1211/
- https://plugins.svn.wordpress.org/document-emberdder/tags/2.4.1/
- https://wordpress.org/plugins/document-emberdder/

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

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.
