# CVE-2021-43827: Inline footnotes wrapped in <a> tags can cause errors in discourse-footnotes

- Severity: Medium 4.3 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.83%, higher than 58% of CVEs (2026-12-01)
- Published: 2021-12-14T22:20:09.000Z
- Modified: 2026-06-17T04:11:31.367Z
- Weaknesses: CWE-755
- Assigned by: GitHub_M

## 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 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.

(As written by CVE List.)

## Affected

- discourse discourse-footnote: < 0.2
- discourse discourse_footnote: before 0.2

## Every score

- GitHub_M: CVSS:3.1 4.3 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L`
- NVD: CVSS:2.0 4.0 Medium `AV:N/AC:L/Au:S/C:N/I:N/A:P`

## References

- <https://github.com/discourse/discourse-footnote/security/advisories/GHSA-58vr-c56v-qr57> (third-party-advisory)
- <https://github.com/discourse/discourse-footnote/commit/796617e0131277011207541313522cd1946661ab> (patch, third-party-advisory)

## Sources

- CVE List: [CVE-2021-43827](https://www.cve.org/CVERecord?id=CVE-2021-43827), CVE Terms of Use, modified 2024-08-04
- NVD: [CVE-2021-43827](https://nvd.nist.gov/vuln/detail/CVE-2021-43827), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-43827 · Whole record: https://cve.day/CVE-2021-43827.json · Rebuilt by cve.day 2026-11-25T22:24:36.247Z
