Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLWgzZ2ctN3d4Mi1jcTNo

XSS in Flarum Sticky extension

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.

Patches

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.

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.

Permalink: https://github.com/advisories/GHSA-h3gg-7wx2-cq3h
JSON: https://advisories.ecosyste.ms/api/v1/advisories/MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLWgzZ2ctN3d4Mi1jcTNo
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Moderate
Classification: General
Published: almost 4 years ago
Updated: almost 2 years ago


Identifiers: GHSA-h3gg-7wx2-cq3h, CVE-2021-21283
References: Repository: https://github.com/flarum/sticky
Blast Radius: 0.0

Affected Packages

packagist:flarum/sticky
Dependent packages: 12
Dependent repositories: 59
Downloads: 288,255 total
Affected Version Ranges: >= 0.1.0-beta.14, <= 0.1.0-beta.15
Fixed in: 0.1.0-beta.15.1
All affected versions: 0.1.0-beta.14, 0.1.0-beta.15
All unaffected versions: 1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.5.0, 1.6.0, 1.6.1, 1.7.0, 1.8.0, 1.8.1