{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2021-43827","id":"CVE-2021-43827","title":"Inline footnotes wrapped in <a> tags can cause errors in discourse-footnotes","description":"discourse-footnote is a library providing footnotes for posts in Discourse. ### Impact When posting an inline footnote wrapped in `<a>` tags (e.g. `<a>^[footnote]</a>`, the resulting rendered HTML would include a nested `<a>`, which is stripped by Nokogiri because it is not valid. This then caused a javascript error on topic pages because we were looking for an `<a>` element inside the footnote re","descriptionLong":"discourse-footnote is a library providing footnotes for posts in Discourse. ### Impact When posting an inline footnote wrapped in `<a>` tags (e.g. `<a>^[footnote]</a>`, the resulting rendered HTML would include a nested `<a>`, which is stripped by Nokogiri because it is not valid. This then caused a javascript error on topic pages because we were looking for an `<a>` element inside the footnote reference span and getting its ID, and because it did not exist we got a null reference error in javascript. Users are advised to update to version 0.2. As a workaround editing offending posts from the rails console or the database console for self-hosters, or disabling the plugin in the admin panel can mitigate this issue.","published":"2021-12-14T22:20:09.000Z","updated":"2026-10-20T10:55:04.910849122Z","reserved":"2021-11-16T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":4.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L","rating":"medium","source":"GitHub_M"},"metrics":[{"version":"3.1","score":4.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L","rating":"medium","source":"GitHub_M"},{"version":"3.1","score":4.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L","rating":"medium","source":"github.com"},{"version":"3.1","score":4.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L","rating":"medium","source":"OSV"},{"version":"2.0","score":4,"vector":"AV:N/AC:L/Au:S/C:N/I:N/A:P","rating":"medium","source":"NVD"}],"rating":"medium","products":["discourse-footnote"],"affectedProducts":[{"vendor":"discourse","product":"discourse-footnote","defaultStatus":null,"versions":[{"status":"affected","version":"< 0.2"}],"platforms":[]}],"packages":[],"cwes":["CWE-755"],"aliases":["GHSA-58vr-c56v-qr57"],"references":[{"url":"https://github.com/discourse/discourse-footnote/security/advisories/GHSA-58vr-c56v-qr57","tags":["x_refsource_CONFIRM","x_transferred","Third Party Advisory","advisory"]},{"url":"https://github.com/discourse/discourse-footnote/commit/796617e0131277011207541313522cd1946661ab","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.00829,"epssPercentile":0.58293,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2021-43827","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-43827","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2021-43827","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2021-43827","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}