{"answers":{"affected":"2 open source packages ship an affected version, including flarum/sticky. It affects 1 product.","exploited":"There is no known exploitation of CVE-2021-21283 in the wild and no public exploit code.","fix":"Upgrade flarum/sticky to 0.1.0-beta.15.1 or later.","what":"CVE-2021-21283 is a medium-severity cross-site scripting vulnerability in flarum sticky, published on 26 Jan 2021. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2021-21283 and fix it if it is affected.\n\nWhat it is: CVE-2021-21283 is a medium-severity cross-site scripting vulnerability in flarum sticky, published on 26 Jan 2021. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2021-21283 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- flarum/sticky (Packagist): affected from 0.1.0-beta.14; fixed in 0.1.0-beta.15.1\n- flarum/sticky (Packagist): affected from 0.1.0-beta.14; fixed in 0.1.0-beta.15.1\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2021-21283/ (Markdown: https://insights.sbomify.com/CVE-2021-21283/index.md)","id":"CVE-2021-21283","markdown":"https://insights.sbomify.com/CVE-2021-21283/index.md","name":"CVE-2021-21283","record":{"aliases":["GHSA-h3gg-7wx2-cq3h"],"analysis":{"component_type":"cms_plugin","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Flarum Sticky extension","requires_auth":"low_privilege","summary":"Attackers with pinning or editing privileges can inject malicious scripts into pinned discussions, leading to cross-site scripting attacks.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"sticky","vendor":"flarum"}],"cvss":{"score":5.4,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","version":"3.1"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"description":"Flarum is an open source discussion platform for websites. The \"Flarum Sticky\" extension versions 0.1.0-beta.14 and 0.1.0-beta.15 has a cross-site scripting vulnerability. 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 the m.trust() helper. This resulted in an HTML injection where \u003cscript\u003e 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. 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. 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.","ecosystems":["Packagist"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"XSS in Flarum Sticky extension.","id":"CVE-2021-21283","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Packagist","product":null,"products":[],"type":"xss","year":"2021"},"n_packages":2,"n_references":4,"next":{"headline":"privilege escalation in Moby","id":"CVE-2021-21284"},"packages":[{"ecosystem":"Packagist","fixed":["0.1.0-beta.15.1"],"introduced":["0.1.0-beta.14"],"last_affected":[],"package":"flarum/sticky","purl":null,"source":"GHSA-h3gg-7wx2-cq3h"},{"ecosystem":"Packagist","fixed":["0.1.0-beta.15.1"],"introduced":["0.1.0-beta.14"],"last_affected":[],"package":"flarum/sticky","purl":"pkg:composer/flarum/sticky","source":"GHSA-h3gg-7wx2-cq3h"}],"prev":{"headline":"Buffer overflow in RPL source routing header processing","id":"CVE-2021-21282"},"products":["sticky"],"published":"2021-01-26","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-03","vendors":["flarum"]},"summary":"Attackers with pinning or editing privileges can inject malicious scripts into pinned discussions, leading to cross-site scripting attacks.","url":"https://insights.sbomify.com/CVE-2021-21283/"}