Hacker News new | past | comments | ask | show | jobs | submit login

This makes me wonder: is CSS turing complete?

Are browsers that allow CSS as vulnerable to being exploited as those that allow Javascript?

Exploits rely on interactions between parts of a system, not on crunching numbers. A pure Turing machine is perfectly un-exploitable since <s>its only i/o is supposed to be to the keyboard and the screen</s> (edit: it has no i/o whatsoever). CSS would have more holes than JS if it offered more APIs (which it might do unknowingly by mistakes in programming).

A "pure" Turing machine has no input or output at all, just an infinite expanse of tape.

Ah, indeed, I tend to confuse it for Brainfuck which at least can do something of use.

I/O on a Turing machine consists of initializing the tape with your input and reading the output off the tape once it's finished computing.

Indeed, and that exactly puts all the onus of exploitability on the machine's environment. The tape might as well be written by regular expressions, if some of the outputs make the ‘interpreter’ do network requests and stuff.

I believe I saw something that said CSS is Turing Complete*

* Only with user interaction to step things along, similar to powerpoint: https://www.youtube.com/watch?v=uNjxe8ShM-8

If hovering counts as user interaction...

It does; it triggers an event just like clicking (or in the case of CSS, a state change).

There was a discussion about this on the front page of HN literally a few hours ago:


Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact