{"answers":{"affected":"1 open source package ship an affected version, including discourse. It affects 1 product.","exploited":"There is no known exploitation of CVE-2021-41095 in the wild and no public exploit code.","fix":"No fix has been published for CVE-2021-41095 yet. Limit exposure of the affected software until one is available.","what":"CVE-2021-41095 is a medium-severity cross-site scripting vulnerability in Discourse Discourse, published on 27 Sep 2021. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2021-41095 and fix it if it is affected.\n\nWhat it is: CVE-2021-41095 is a medium-severity cross-site scripting vulnerability in Discourse Discourse, published on 27 Sep 2021. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2021-41095 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- discourse (Bitnami): affected all versions up to 2.7.7; no fix listed\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-41095/ (Markdown: https://insights.sbomify.com/CVE-2021-41095/index.md)","id":"CVE-2021-41095","markdown":"https://insights.sbomify.com/CVE-2021-41095/index.md","name":"CVE-2021-41095","record":{"aliases":["BIT-discourse-2021-41095","GHSA-qvqx-2h7w-m479"],"analysis":{"component_type":"web_application","fix_type":"patch","impacts":["code_execution","account_takeover"],"network_reachable":"yes","non_default_config":true,"product_category":"Discourse forum","requires_auth":"none","summary":"Attackers can execute scripts via blocked watched words in error messages if CSP is modified, affecting Discourse forum users.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"discourse","vendor":"discourse"}],"cvss":{"score":4.2,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N","version":"3.1"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"description":"Discourse is an open source discussion platform. There is a cross-site scripting (XSS) vulnerability in versions 2.7.7 and earlier of the `stable` branch, versions 2.8.0.beta6 and earlier of the `beta` branch, and versions 2.8.0.beta6 and earlier of the `tests-passed` branch. Rendering of some error messages that contain user input can be susceptible to XSS attacks. This vulnerability only affects sites which have blocked watched words that contain HTML tags, modified or disabled Discourse's default Content Security Policy. This issue is patched in the latest `stable`, `beta` and `tests-passed` versions of Discourse. As a workaround, avoid modifying or disabling Discourse’s default Content Security Policy, and blocking watched words containing HTML tags.","ecosystems":["Bitnami"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":false,"headline":"XSS via blocked watched word in error message","id":"CVE-2021-41095","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Bitnami","product":"discourse:discourse","products":["discourse:discourse"],"type":"xss","year":"2021"},"n_packages":1,"n_references":2,"next":{"headline":"Use of a Broken or Risky Cryptographic Algorithm in com.mayank.rucky","id":"CVE-2021-41096"},"packages":[{"ecosystem":"Bitnami","fixed":[],"introduced":["0"],"last_affected":["2.7.7"],"package":"discourse","purl":"pkg:bitnami/discourse","source":"BIT-discourse-2021-41095"}],"prev":{"headline":"Mandatory encryption at rest can be bypassed (UI) in Wire app","id":"CVE-2021-41094"},"products":["discourse"],"published":"2021-09-27","related":[{"cvss_score":10,"headline":"RCE via malicious SNS subscription payload","id":"CVE-2021-41163","kev_date_added":null,"published":"2021-10-20"},{"cvss_score":9.1,"headline":"Discourse vulnerable to RCE via admins uploading maliciously zipped file","id":"CVE-2022-36066","kev_date_added":null,"published":"2022-09-29"},{"cvss_score":8.9,"headline":"Discourse user account takeover via email and invite link","id":"CVE-2022-39356","kev_date_added":null,"published":"2022-11-02"},{"cvss_score":8.8,"headline":"Discourse vulnerable to Cross-site Scripting in local oneboxes","id":"CVE-2023-22468","kev_date_added":null,"published":"2023-01-26"},{"cvss_score":8.7,"headline":"Discourse leaks private topic title and post excerpt via user action API endpoint","id":"CVE-2026-27934","kev_date_added":null,"published":"2026-03-19"},{"cvss_score":8.7,"headline":"Discourse vulnerable to DoS via large URL payload in PM to a bot","id":"CVE-2025-48053","kev_date_added":null,"published":"2025-06-09"},{"cvss_score":8.6,"headline":"Discourse vulnerable to unlimited mentioned users in message serializer","id":"CVE-2023-48297","kev_date_added":null,"published":"2024-01-12"}],"sources":[{"class":"attribution","licence":"Apache-2.0","name":"Bitnami","prefix":"BIT"},{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"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-04","vendors":["discourse"]},"summary":"Attackers can execute scripts via blocked watched words in error messages if CSP is modified, affecting Discourse forum users.","url":"https://insights.sbomify.com/CVE-2021-41095/"}