# Custom Query Blocks <= 5.6.0 - Authenticated (Contributor+) Stored Cross-Site Scripting via Custom Post Types Block Attributes

- **ID:** WPSEC-2026-0756
- **Plugin:** Custom Query Blocks (`post-type-archive-mapping`), https://wordpress.org/plugins/post-type-archive-mapping/
- **Affected versions:** all versions before 5.7.0
- **Fixed in:** 5.7.0 (Update to 5.7.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-10-10)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/post-type-archive-mapping
- **Fix released:** 2026-10-09
- **Published:** 2026-10-10
- **URL:** https://wpsec.com/vuln/WPSEC-2026-0756/

## Description

The Custom Query Blocks plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the Custom Post Types block's color and alignment attributes (titleColor, contentColor, titleAlignment, metaAlignment and contentAlignment) in all versions up to, and including, 5.6.0. This is due to insufficient input sanitization and output escaping: the attribute values are placed unescaped inside single-quoted inline style attributes. 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-0756/
- https://plugins.svn.wordpress.org/post-type-archive-mapping/tags/5.7.0/
- https://wordpress.org/plugins/post-type-archive-mapping/

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

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.
