Skip to content

High colspan values can cause denial of service on servers or machine to freeze #231

Closed

Description

@alheiveea

Similar to issue #143 a very high value for colspan in <th> or <td> elements can cause resource exhaustion and denial of service on a server or a system freeze locally.

The code to reproduce:
md = markdownify('<table><tr><th colspan="999999999"></th></tr><table>')

If you check the HTML Living Standard the allowed values for colspan are 1 until 1000, so the processed values should be limited to this range.

Activity

  1. chrispy-snps commented on Jul 13, 2025

    @chrispy-snps
    Collaborator

    @alheiveea - thanks for finding this!

  2. alheiveea commented on Jul 24, 2025

    @alheiveea
    ContributorAuthor

    You're welcome! I'm closing this issue now that the pull request has been merged.
    Is there a roadmap or timeline for the next release that will include this fix?

  3. AlexVonB commented on Aug 9, 2025

    @AlexVonB
    Collaborator

    @alheiveea v1.2.0 should contain your PR :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions