Skip to content
Heist/ feed
Back to feed
Medium

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-41168

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2021-41168
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 12:37 UTC · Revision 1

Source evidence

CVE-2021-41168

core-osv · Original source

Published 21 Oct 2021, 20:15 UTC

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.

osv:CVE-2021-41168
Complete source record
{
  "id": "609768df8c9d3578e7b5441af259f9c1d8279d188d16bd7106e6173847d6bad1",
  "url": "https://osv.dev/vulnerability/CVE-2021-41168",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-41168",
    "summary": "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.",
    "evidence": "osv:CVE-2021-41168",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2021-41168",
      "aliases": [
        "CVE-2021-41168",
        "GHSA-6gvv-9q92-w5f6"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/reddit/snudown",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "1ac2c130b210539ee1e5d67a7bac93f9d8007c0e"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "fixed": "1ac2c130b210539ee1e5d67a7bac93f9d8007c0e"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v1.5.0",
            "v1.3.2",
            "v1.3.1",
            "v1.3.0",
            "v1.2.0",
            "v1.1.6",
            "v1.1.5",
            "v1.1.4",
            "v1.1.3",
            "v1.1.2",
            "v1.1.1",
            "v1.1.0",
            "v1.0.6",
            "v1.0.5",
            "v1.0.3",
            "v1.0.2",
            "v1.0.1",
            "v1.0.0",
            "semver"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-41168.json",
            "vanir_signatures": [
              {
                "id": "CVE-2021-41168-05cba49c",
                "digest": {
                  "length": 2655,
                  "function_hash": "20580100343692770284238187237742032078"
                },
                "source": "https://github.com/reddit/snudown/commit/1ac2c130b210539ee1e5d67a7bac93f9d8007c0e",
                "target": {
                  "file": "src/markdown.c",
                  "function": "is_ref"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2021-41168-29530aaa",
                "digest": {
                  "length": 233,
                  "function_hash": "20765170158290917875368543958113631923"
                },
                "source": "https://github.com/reddit/snudown/commit/1ac2c130b210539ee1e5d67a7bac93f9d8007c0e",
                "target": {
                  "file": "src/markdown.c",
                  "function": "hash_link_ref"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2021-41168-5610f083",
                "digest": {
                  "length": 1689,
                  "function_hash": "166756017230671304016185082935543562920"
                },
                "source": "https://github.com/reddit/snudown/commit/1ac2c130b210539ee1e5d67a7bac93f9d8007c0e",
                "target": {
                  "file": "src/markdown.c",
                  "function": "sd_markdown_new"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2021-41168-6b42d799",
                "digest": {
                  "threshold": 0.9,
                  "line_hashes": [
                    "102973550463838236998018541819449317896",
                    "233638556763823706228320482219308008933",
                    "296853064810733728438313064051335492389",
                    "4130784161332862134505622483653914349",
                    "278773958506617554021061748254253457551",
                    "175428871429282964884884515663371312396",
                    "53979971486333905582848220216056471088",
                    "194320553778941865723327680677420457404",
                    "27100925325255453652376330442950763509",
                    "300503844845277424751058596042898138151",
                    "157611902504548340949619337624628714219",
                    "195622317966987111483884297503166266962",
                    "285126518049648123691657843463530100992",
                    "273236421592493833818431181633649593498",
                    "101878511057637847776606636999382272060",
                    "189894479043908495123881664766786718875",
                    "64143614451328667467395092089675084759",
                    "243632040583817056728204768561718400310",
                    "265211956821578816359665009655443126502",
                    "75885579269052268305371576834947873480",
                    "234244625286470027444389434257028692905",
                    "104952833383004671348257411751708028940",
                    "86764878058056256319740095072124124106",
                    "82203691597302969926305107007930481690",
                    "104087911631330850271681614779112568017",
                    "262079327931277042224757354240905701041",
                    "238147093580459753740720717957846271925",
                    "34669548779517735945085247778422204737",
                    "218585946084649336931693615908594851791",
                    "196277938095939353801384574474830992551",
                    "116741311525606739243957762295734527025",
                    "183190246758520531483736563996331415641",
                    "220925813658838374039674351988399400089",
                    "113651375763926056296258760986285452752",
                    "204703281871205371690724493985202547611",
                    "51164489580453966260782930617149762355",
                    "300650327248656898282834893530588093629",
                    "302670486320910042156744891045482993991",
                    "80206397274498518601590121604861015617",
                    "49853982577684993938877919483034401576",
                    "232377188279393107114830534022276290964",
                    "240993340354965074024912801264590740146",
                    "159599922476168204457200115758357249518"
                  ]
                },
                "source": "https://github.com/reddit/snudown/commit/1ac2c130b210539ee1e5d67a7bac93f9d8007c0e",
                "target": {
                  "file": "src/markdown.c"
                },
                "deprecated": false,
                "signature_type": "Line",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2021-41168-b90d746d",
                "digest": {
                  "length": 276,
                  "function_hash": "270987219790653047040905857090541514611"
                },
                "source": "https://github.com/reddit/snudown/commit/1ac2c130b210539ee1e5d67a7bac93f9d8007c0e",
                "target": {
                  "file": "src/markdown.c",
                  "function": "free_link_refs"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2021-41168-c6b2b1db",
                "digest": {
                  "length": 284,
                  "function_hash": "232706597501093606020616332611691957915"
                },
                "source": "https://github.com/reddit/snudown/commit/1ac2c130b210539ee1e5d67a7bac93f9d8007c0e",
                "target": {
                  "file": "src/markdown.c",
                  "function": "find_link_ref"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2021-41168-dd441b44",
                "digest": {
                  "length": 312,
                  "function_hash": "80206188057821536112204676303042936837"
                },
                "source": "https://github.com/reddit/snudown/commit/1ac2c130b210539ee1e5d67a7bac93f9d8007c0e",
                "target": {
                  "file": "src/markdown.c",
                  "function": "add_link_ref"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              }
            ],
            "vanir_signatures_modified": "2026-10-20T14:06:38Z"
          }
        }
      ],
      "modified": "2026-10-20T14:06:38.845790396Z",
      "provider": "osv",
      "references": [
        "https://github.com/reddit/snudown/commit/1ac2c130b210539ee1e5d67a7bac93f9d8007c0e",
        "https://github.com/reddit/snudown/security/advisories/GHSA-6gvv-9q92-w5f6"
      ],
      "provider_metadata": {
        "unresolved_ranges": [
          {
            "cpes": [
              "cpe:2.3:a:reddit:snudown:*:*:*:*:*:*:*:*"
            ],
            "vendor_product": "reddit:snudown",
            "extracted_events": [
              {
                "range": [
                  {
                    "fixed": "1.7.0"
                  }
                ],
                "source": "CPE_RANGE"
              }
            ]
          }
        ]
      }
    },
    "related_cves": [
      {
        "value": "CVE-2021-41168",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 388557,
  "published_at": "2021-10-21T20:15:08.417+00:00"
}