{"answers":{"affected":"1 open source package ship an affected version, including couchdb. It affects 1 product.","exploited":"There is no known exploitation of CVE-2021-38295 in the wild and no public exploit code.","fix":"Upgrade couchdb to 3.1.2 or later.","what":"CVE-2021-38295 is a high-severity cross-site scripting vulnerability in Apache CouchDB, published on 14 Oct 2021. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2021-38295 and fix it if it is affected.\n\nWhat it is: CVE-2021-38295 is a high-severity cross-site scripting vulnerability in Apache CouchDB, published on 14 Oct 2021. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2021-38295 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- couchdb (Bitnami): affected all versions; fixed in 3.1.2\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-38295/ (Markdown: https://insights.sbomify.com/CVE-2021-38295/index.md)","id":"CVE-2021-38295","markdown":"https://insights.sbomify.com/CVE-2021-38295/index.md","name":"CVE-2021-38295","record":{"aliases":["BIT-couchdb-2021-38295","GHSA-gr7p-9mx8-wr74","MGASA-2021-0520","UBUNTU-CVE-2021-38295"],"analysis":{"component_type":"server_software","fix_type":"upgrade","impacts":["privilege_escalation","code_execution"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Apache CouchDB","requires_auth":"low_privilege","summary":"A malicious user can execute JavaScript in an admin's browser via HTML attachments, leading to privilege escalation and database control.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"apache","cpe":[{"product":"couchdb","vendor":"apache"}],"cvss":{"score":7.3,"severity":"high","source":"nvd","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"description":"In Apache CouchDB, a malicious user with permission to create documents in a database is able to attach a HTML attachment to a document. If a CouchDB admin opens that attachment in a browser, e.g. via the CouchDB admin interface Fauxton, any JavaScript code embedded in that HTML attachment will be executed within the security context of that admin. A similar route is available with the already deprecated _show and _list functionality. This privilege escalation vulnerability allows an attacker to add or remove data in any database or make configuration changes. This issue affected Apache CouchDB prior to 3.1.2","ecosystems":["Bitnami"],"exploits":{"exploitdb":0,"first_seen":"2021-10-14","github_poc":1,"max_poc_stars":3,"metasploit":0,"nuclei":0,"refs":[{"date":"2021-10-14T15:45:21Z","kind":"github_poc","ref":"https://github.com/ProfessionallyEvil/CVE-2021-38295-PoC","stars":3,"title":"A simple Python proof of concept for CVE-2021-38295."}],"tier":"poc_unverified"},"has_fix":true,"headline":"Privilege escalation vulnerability when using HTML attachments","id":"CVE-2021-38295","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Bitnami","product":null,"products":[],"type":"xss","year":"2021"},"n_packages":1,"n_references":1,"next":{"headline":"Apache Spark Key Negotiation Vulnerability","id":"CVE-2021-38296"},"packages":[{"ecosystem":"Bitnami","fixed":["3.1.2"],"introduced":["0"],"last_affected":[],"package":"couchdb","purl":"pkg:bitnami/couchdb","source":"BIT-couchdb-2021-38295"}],"prev":{"headline":"Shell Command Injection Vulnerability in Nimbus Thrift Server","id":"CVE-2021-38294"},"products":["Apache CouchDB","IBM Cloudant"],"published":"2021-10-14","related":[{"cvss_score":9.8,"headline":"Apache CouchDB Insecure Default Initialization of Resource","id":"CVE-2022-24706","kev_date_added":"2022-08-25","published":"2022-04-26"},{"cvss_score":9.8,"headline":"Auth bypass in Apache CouchDB","id":"CVE-2020-1955","kev_date_added":null,"published":"2020-05-20"},{"cvss_score":9.8,"headline":"Privilege escalation in Apache CouchDB","id":"CVE-2017-12635","kev_date_added":null,"published":"2017-11-14"},{"cvss_score":7.8,"headline":"Code injection in n/a","id":"CVE-2018-14889","kev_date_added":null,"published":"2018-09-21"},{"cvss_score":7.8,"headline":"Privilege escalation in Apache CouchDB","id":"CVE-2016-8742","kev_date_added":null,"published":"2018-02-12"},{"cvss_score":7.2,"headline":"Code injection in Apache CouchDB","id":"CVE-2018-17188","kev_date_added":null,"published":"2019-01-02"}],"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)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-04","vendors":["Apache Software Foundation"]},"summary":"A malicious user can execute JavaScript in an admin's browser via HTML attachments, leading to privilege escalation and database control.","url":"https://insights.sbomify.com/CVE-2021-38295/"}