{"schemaVersion":3,"id":"CVE-2021-38295","aliases":["MGASA-2021-0520","UBUNTU-CVE-2021-38295"],"status":"published","duplicateOf":null,"title":null,"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","dates":{"published":"2021-10-14T19:55:12.000Z","modified":"2024-08-04T01:37:16.335Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":7.3,"severity":"high","version":"3.1","versionLabel":"v3.1","source":"NVD","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"OSV · Ubuntu","score":7.3,"severity":"high","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H","exploitability":3.3,"impact":9.8,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":7.3,"severity":"high","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H","exploitability":null,"impact":null,"computed":false},{"version":"2.0","versionLabel":"v2.0","source":"NVD","score":6,"severity":"medium","vector":"AV:N/AC:M/Au:S/C:P/I:P/A:P","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.02749,"percentile":0.85999,"severity":"low","asOf":"2026-10-19T00:00:00.000Z","change":{"pp":0.23500000000000015,"baselineDate":"2026-09-19T00:00:00.000Z","baselineScore":0.02514},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.02749,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.02749,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.02749,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.02749,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.02749,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.02749,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.02749,"percentile":0.85999}],"last30":[{"date":"2026-09-19T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.02514,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.02749,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.02749,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.02749,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.02749,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.02749,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.02749,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.02749,"percentile":0.85999}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')","description":"The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.","type":"weakness","status":"Stable","abstraction":"Base","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/79.html"}],"affected":[{"vendor":"apache software foundation","product":"apache couchdb","name":"Apache CouchDB","label":"apache couchdb","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ Apache CouchDB, < 3.1.2","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ Apache CouchDB, < 3.1.2","eol":null,"hubHref":"/vendor/apache_software_foundation/apache_couchdb"},{"vendor":"apache software foundation","product":"ibm cloudant","name":"IBM Cloudant","label":"ibm cloudant","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ IBM Cloudant, < 8201","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ IBM Cloudant, < 8201","eol":null,"hubHref":"/vendor/apache_software_foundation/ibm_cloudant"},{"vendor":"apache","product":"couchdb","name":"CouchDB","label":"couchdb","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 3.1.2","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 3.1.2","eol":{"isEol":null,"eolDate":null,"matchMethod":"cpe","cycle":null,"product":{"name":"apache-couchdb","label":"Apache CouchDB","category":"database"}},"hubHref":"/vendor/apache/couchdb"},{"vendor":"ubuntu","product":"couchdb","name":"couchdb","label":"couchdb","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/couchdb","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"mageia","product":"couchdb","name":"couchdb","label":"couchdb","ecosystem":"Mageia","cpePart":null,"purl":"pkg:rpm/mageia/couchdb","purlType":"rpm","versions":[{"text":"< 3.1.2-1.mga8","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 3.1.2-1.mga8","eol":null,"hubHref":null}],"affectedCount":5,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://docs.couchdb.org/en/stable/cve/2021-38295.html","label":"docs.couchdb.org/en/stable/cve/2021-38295.html","hostname":"docs.couchdb.org","tags":["X Refsource MISC","Vendor Advisory"]},{"url":"https://advisories.mageia.org/MGASA-2021-0520.html","label":"advisories.mageia.org/MGASA-2021-0520.html","hostname":"advisories.mageia.org","tags":["Advisory"]},{"url":"https://bugs.mageia.org/show_bug.cgi?id=29548","label":"bugs.mageia.org/show_bug.cgi?id=29548","hostname":"bugs.mageia.org","tags":["REPORT"]},{"url":"https://www.openwall.com/lists/oss-security/2021/10/12/2","label":"www.openwall.com/lists/oss-security/2021/10/12/2","hostname":"www.openwall.com","tags":["WEB"]},{"url":"https://ubuntu.com/security/CVE-2021-38295","label":"ubuntu.com/security/CVE-2021-38295","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-38295","label":"www.cve.org/CVERecord?id=CVE-2021-38295","hostname":"www.cve.org","tags":["REPORT"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2021-10-14T19:55:12.000Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2024-08-04T01:37:16.335Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":30,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-20T09:51:32.281Z","stale":false,"partial":false}}