CVE-2021-41168: Hash-Collision Denial-of-Service Vulnerability in snudown
Snudown is a reddit-specific fork of the Sundown Markdown parser used by GitHub, with Python integration added. In affected versions snudown was found to be vulnerable to denial of service attacks to its reference table implementation. References written in markdown [referencename]: https://www.example.com are inserted into a hash table which was found to have a weak hash function, meaning that an attacker can reliably generate a large number of collisions for it. This makes the hash table vulnerable to a hash-collision DoS attack, a type of algorithmic complexity attack. Further the hash table allowed for duplicate entries resulting in long retrieval times. Proofs of concept and further discussion of the hash collision issue are discussed on the snudown GHSA(https://github.com/reddit/snudown/security/advisories/GHSA-6gvv-9q92-w5f6). Users are advised to update to version 1.7.0.
Affected Software
Remediation
Event History
Frequently Asked Questions
Who is exposed to this denial-of-service issue?
Deployments using affected versions of reddit Snudown are exposed when they process attacker-controlled Markdown that can contain reference definitions. The attacker needs the ability to submit or otherwise cause the application to parse that Markdown.
What does an attacker need to do to trigger the issue?
An attacker needs low-privileged access to provide Markdown input containing many reference entries engineered to collide in Snudown's reference-table hash function. No user interaction is required.
What is the impact of successful exploitation?
The colliding and duplicate reference entries can cause expensive hash-table operations and long retrieval times, resulting in denial of service. The provided CVSS vector indicates no confidentiality or integrity impact.
What should teams do if they cannot patch immediately?
The provided data identifies patching as the remedy and advises updating Snudown to version 1.7.0. No specific temporary mitigation is provided.