Putting link inside link in markdown
The markdown parser allowed nested links up to a depth of 16, and a deeply nested link could cause a Cloudflare 522 error. An attacker could potentially cause a denial of service by submitting such input.
- Triaged in 45 hours
- Fixed in 43 days
- Paid in 54 days
- Disclosed after 55 days
Hello. I was playing around in markdown editor and find 1 interesting feature. You can put a link inside link.
[ [ololo][l] ][l]
[l]:http://dwq
If you do it [ololo][l] will be parsed first, then result of parsing will be send outside.
Maximum depth of such link inserting is 16.
So the slowest thing we can do is:
[[[[[[[[[[[[[[[[][l]][l]][l]][l]][l]][l]][l]][l]][l]][l]][l]][l]][l]][l]][l]][l]
[l]:http://dwq
If we will add more such lines we will get error 522 from cloudflare.
Example with 522 error: https://hackerone.com/fuzopeti
Attachments

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the markdown parser processes nested links recursively up to a depth of 16, and the deepest case is slow.
Impact
Deeply nested links can make the slowest case and trigger a Cloudflare 522 error.
What the attacker needed
Access to a markdown editor
How it was found
- Open the markdown editor.
- Enter a link nested inside another link using the syntax shown.
- Observe that the inner link is parsed first and then the outer link.
- Increase the nesting depth up to 16 to create the slowest case.
- Add more nested links to trigger a Cloudflare 522 error.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
Markdown is a way to format text, and links can be written in a special syntax. The report shows that you can put a link inside another link, and the parser handles up to 16 levels. A very deeply nested link made the server time out, which could be used to disrupt the service.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.