CVE-2021-21283

CVE-2021-21283 is a medium-severity cross-site scripting (XSS) vulnerability in flarum/sticky (composer), affecting versions >= 0.1.0-beta.14, <= 0.1.0-beta.15. It is fixed in 0.1.0-beta.15.1.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

XSS in Flarum Sticky extension

Workarounds

Forum administrators can disable the Sticky extension until they are able to apply the update. The vulnerability cannot be exploited while the extension is disabled.

References

For more information

If you have any questions or comments about this advisory, please start a new discussion on our support forum.

If you discover a security vulnerability within Flarum, please send an e-mail to [email protected]. All security vulnerabilities will be promptly addressed. More details can be found in our security policy.

Impact

A change in release beta 14 of the Sticky extension caused the plain text content of the first post of a pinned discussion to be injected as HTML on the discussion list. The issue was discovered following an internal audit.

Any HTML would be injected through Mithril's m.trust() helper. This resulted in an HTML injection where <script> tags would not be executed. However it was possible to run javascript from other HTML attributes, enabling a cross-site scripting (XSS) attack to be performed.

Since the exploit only happens with the first post of a pinned discussion, an attacker would need the ability to pin their own discussion, or be able to edit a discussion that was previously pinned.

On forums where all pinned posts are authored by your staff, you can be relatively certain the vulnerability has not been exploited.

Forums where some user-created discussions were pinned can look at the first post edit date to find whether the vulnerability might have been exploited. Because Flarum doesn't store the post content history, you cannot be certain if a malicious edit was reverted.

Untrusted input is rendered as active markup in a victim's browser, which can run script in their session. Typical impact: session or credential theft, and actions taken as the user.

Affected versions

flarum/sticky (>= 0.1.0-beta.14, <= 0.1.0-beta.15)

Security releases

flarum/sticky → 0.1.0-beta.15.1 (composer)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

The fix will be available in version v0.1.0-beta.16 with Flarum beta 16. The fix has already been back-ported to Flarum beta 15 as version v0.1.0-beta.15.1 of the Sticky extension.

Frequently Asked Questions

  1. What is CVE-2021-21283? CVE-2021-21283 is a medium-severity cross-site scripting (XSS) vulnerability in flarum/sticky (composer), affecting versions >= 0.1.0-beta.14, <= 0.1.0-beta.15. It is fixed in 0.1.0-beta.15.1. Untrusted input is rendered as active markup in a victim's browser, which can run script in their session.
  2. Which versions of flarum/sticky are affected by CVE-2021-21283? flarum/sticky (composer) versions >= 0.1.0-beta.14, <= 0.1.0-beta.15 is affected.
  3. Is there a fix for CVE-2021-21283? Yes. CVE-2021-21283 is fixed in 0.1.0-beta.15.1. Upgrade to this version or later.
  4. Is CVE-2021-21283 exploitable, and should I be worried? Whether CVE-2021-21283 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  5. What actually determines whether CVE-2021-21283 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  6. How do I fix CVE-2021-21283? Upgrade flarum/sticky to 0.1.0-beta.15.1 or later.

Stop the waste.
Protect your environment with Kodem.