# BetterLinks <= 3.1.7 - Authenticated (Subscriber+) Stored Cross-Site Scripting via FluentBoards Short URL

- **ID:** WPSEC-2026-4586
- **Plugin:** BetterLinks – Link Shortener, Link Cloaking, Redirects, Affiliate Link Manager & MCP (`betterlinks`), https://wordpress.org/plugins/betterlinks/
- **Affected versions:** from 2.1.9 before 3.1.8
- **Fixed in:** 3.1.8 (Update to 3.1.8 or later.)
- **Severity:** Medium 4.9 (CVSS:3.1/AV:N/AC:H/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-04)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/betterlinks
- **Fix released:** 2026-12-03
- **Published:** 2026-12-04
- **URL:** https://wpsec.com/vuln/WPSEC-2026-4586/

## Description

The BetterLinks plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the short URL of FluentBoards task links in versions 2.1.9 up to, and including, 3.1.7. This is due to the FluentBoards link create and update AJAX handlers (betterlinks__create_fbs_link and betterlinks__update_fbs_link) storing the short URL after only sanitize_text_field(), without the plugin's usual short URL validation that forbids quotes, angle brackets and whitespace, combined with the plugin's the_content filter writing the short URL into the href attribute of BetterLinks linked-text anchors without output escaping. This makes it possible for authenticated attackers with subscriber-level access or higher who can manage a FluentBoards task, such as low-privileged board members, to inject arbitrary web scripts into pages that link to that short link, which will execute whenever a user accesses an affected page. Exploitation requires the FluentBoards plugin to be active and the attacker's short link to be referenced from post content.

## References

- https://wpsec.com/vuln/WPSEC-2026-4586/
- https://plugins.svn.wordpress.org/betterlinks/tags/3.1.8/
- https://wordpress.org/plugins/betterlinks/

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

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.
