# Login With Ajax – Fast Logins, 2FA, Redirects <= 4.5.1 - Authenticated (Contributor+) Stored Cross-Site Scripting via Login Block 'template_color' Attribute

- **ID:** WPSEC-2026-2881
- **Plugin:** AJAX Auth – Fast Logins, 2FA, Redirects (`login-with-ajax`), https://wordpress.org/plugins/login-with-ajax/
- **Affected versions:** from 4.0 before 4.6
- **Fixed in:** 4.6 (Update to 4.6 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 Medium, affected versions Medium (as of 2026-11-12)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/login-with-ajax
- **Fix released:** 2026-11-10
- **Published:** 2026-11-12
- **URL:** https://wpsec.com/vuln/WPSEC-2026-2881/

## Description

The AJAX Auth (formerly Login With AJAX) plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the login block's 'template_color' attribute in all versions up to, and including, 4.5.1 due to insufficient input sanitization and output escaping. The hue, saturation and lightness values of the attribute were copied unvalidated into CSS custom properties, which the login and logged-in templates printed inside a single-quoted style attribute without escaping. This makes it possible for authenticated attackers, with contributor-level access and above, to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page.

## References

- https://wpsec.com/vuln/WPSEC-2026-2881/
- https://plugins.svn.wordpress.org/login-with-ajax/tags/4.6/
- https://wordpress.org/plugins/login-with-ajax/

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

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.
