r/ProgrammerHumor • • Oct 24 '26

Meme waitingForHtmlVulnerability

Post image
6.7k Upvotes

145 comments sorted by

View all comments

32

u/Stummi Oct 25 '26

HTML parsing and rendering is hugely complex nowadays, and all browsers consist of literally millions of lines of code. It's more than likely that there are unknown vulnerabilities lurking.

9

u/kratz9 Oct 25 '26

I remember back in college, if you pasted huge text data into the Google search box in Firefox (back when the search was part of the page, not the address bar) , it would crash the video driver on the our lab computers. 

3

u/Nightmoon26 Oct 25 '26

I mean, there's at least one in XML... I don't know if the Billion Laughs attack can be implemented in HTML

3

u/ArjixGamer Oct 25 '26

Parsing is not that complex, I can do it in one afternoon out of memory w/o reading an rfc.

The hard part is truly, rendering

3

u/Stummi Oct 25 '26

I kinda doubt that. You are probably grossly underestimating the complexity of HTML to do such a statement. Even parsing is hard

2

u/ArjixGamer Oct 25 '26

No, it's just that I've done it thrice before.

Sure I may not have aimed for 100% compliance with the spec, but I could parse it, manipulate it via my fake DOM and serialize it.

The "hard" part is the edge cases, which aren't hard, you just have to know them before they hit you. (or just read the spec)

I think parsing CSS is way more complex.

1

u/Stummi Oct 25 '26

Just to be sure, we are talking about the HTML5 standard, right? Or did you mean one of the earlier HTML versions, or XHTML?

3

u/ArjixGamer Oct 25 '26

HTML5 yes

Writing a parser like jsoup or bs4 is not hard