{"id":"CVE-2021-43827","state":"PUBLISHED","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 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.","publishedAt":"2021-12-14T22:20:09.000Z","updatedAt":"2024-08-04T04:03:08.963Z","severity":{"score":4.3,"label":"Medium","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L","source":"GitHub_M"},"assigner":"GitHub_M","products":["discourse discourse-footnote"],"affected":[{"vendor":"discourse","product":"discourse-footnote","versions":[{"version":"< 0.2","status":"affected"}]}],"references":["https://github.com/discourse/discourse-footnote/security/advisories/GHSA-58vr-c56v-qr57","https://github.com/discourse/discourse-footnote/commit/796617e0131277011207541313522cd1946661ab"],"weaknesses":["CWE-755"],"ingestedAt":"2026-10-29T19:49:07.642Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2021/43xxx/CVE-2021-43827.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-2021-43827","state":"PUBLISHED","datePublished":"2021-12-14T22:20:09.000Z","dateUpdated":"2024-08-04T04:03:08.963Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2021-11-16T00:00:00.000Z"},"containers":{"cna":{"title":"Inline footnotes wrapped in <a> tags can cause errors in discourse-footnotes","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"discourse","product":"discourse-footnote","versions":[{"version":"< 0.2","status":"affected"}]}],"references":[{"url":"https://github.com/discourse/discourse-footnote/security/advisories/GHSA-58vr-c56v-qr57","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/discourse/discourse-footnote/commit/796617e0131277011207541313522cd1946661ab","tags":["x_refsource_MISC"]}],"metrics":[{"cvssV3_1":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"LOW","baseScore":4.3,"baseSeverity":"MEDIUM","confidentialityImpact":"NONE","integrityImpact":"NONE","privilegesRequired":"LOW","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L","version":"3.1"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-755","description":"CWE-755: Improper Handling of Exceptional Conditions","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","dateUpdated":"2021-12-14T22:20:09.000Z","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa"},"source":{"advisory":"GHSA-58vr-c56v-qr57","discovery":"UNKNOWN"},"x_legacyV4Record":{"CVE_data_meta":{"ASSIGNER":"security-advisories@github.com","ID":"CVE-2021-43827","STATE":"PUBLIC","TITLE":"Inline footnotes wrapped in <a> tags can cause errors in discourse-footnotes"},"affects":{"vendor":{"vendor_data":[{"product":{"product_data":[{"product_name":"discourse-footnote","version":{"version_data":[{"version_value":"< 0.2"}]}}]},"vendor_name":"discourse"}]}},"data_format":"MITRE","data_type":"CVE","data_version":"4.0","description":{"description_data":[{"lang":"eng","value":"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."}]},"impact":{"cvss":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"LOW","baseScore":4.3,"baseSeverity":"MEDIUM","confidentialityImpact":"NONE","integrityImpact":"NONE","privilegesRequired":"LOW","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L","version":"3.1"}},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"CWE-755: Improper Handling of Exceptional Conditions"}]}]},"references":{"reference_data":[{"name":"https://github.com/discourse/discourse-footnote/security/advisories/GHSA-58vr-c56v-qr57","refsource":"CONFIRM","url":"https://github.com/discourse/discourse-footnote/security/advisories/GHSA-58vr-c56v-qr57"},{"name":"https://github.com/discourse/discourse-footnote/commit/796617e0131277011207541313522cd1946661ab","refsource":"MISC","url":"https://github.com/discourse/discourse-footnote/commit/796617e0131277011207541313522cd1946661ab"}]},"source":{"advisory":"GHSA-58vr-c56v-qr57","discovery":"UNKNOWN"}}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://github.com/discourse/discourse-footnote/security/advisories/GHSA-58vr-c56v-qr57","tags":["x_refsource_CONFIRM","x_transferred"]},{"url":"https://github.com/discourse/discourse-footnote/commit/796617e0131277011207541313522cd1946661ab","tags":["x_refsource_MISC","x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-04T04:03:08.963Z"}}]}}}