# WP Datepicker <= 2.1.6 - Authenticated (Administrator+) Stored Cross-Site Scripting via Date Format and Date Range Settings

- **ID:** WPSEC-2026-2358
- **Plugin:** WP Datepicker (`wp-datepicker`), https://wordpress.org/plugins/wp-datepicker/
- **Affected versions:** all versions before 2.1.7
- **Fixed in:** 2.1.7 (Update to 2.1.7 or later.)
- **Severity:** Medium 4.4 (CVSS:3.1/AV:N/AC:H/PR:H/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-11-03)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/wp-datepicker
- **Fix released:** 2026-10-30
- **Published:** 2026-11-03
- **URL:** https://wpsec.com/vuln/WPSEC-2026-2358/

## Description

The WP Datepicker plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the datepicker date format, default date and date range settings in all versions up to, and including, 2.1.6 due to insufficient output escaping when the values are printed into generated JavaScript. This makes it possible for authenticated attackers, with administrator-level access and above, to inject arbitrary web scripts that execute in pages loading the generated script. This only affects multi-site installations and installations where unfiltered_html has been disabled.

## References

- https://wpsec.com/vuln/WPSEC-2026-2358/
- https://plugins.svn.wordpress.org/wp-datepicker/tags/2.1.7/
- https://wordpress.org/plugins/wp-datepicker/

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

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.
