Of course, letting users upload arbitrary CSS served from your domain is an XSS-level risk, but let's say you let each user have his own domain and let them upload .less files.
Or you have a say, node.js APP that lets a user enter LESS and spit out the -- escaped -- CSS.
Now they can do:
div.hack {
background-image: data-uri("/etc/passwd");
}
When compiled with lessc 1.4.2, this embeds the contents of that file as base64.Also, with 1.3.x."@import" lets you open any filename and insert it, but it's required to be valid .less. I suppose you could try to @import /dev/random or urandom although I don't know if there's any practical attack surface for decreasing entropy. I don't think I could offhand find a valid file.
However in the theorethical web page evaluating .less, the error output will contain the contents of the file @imported.
Oh, and the evaluation of Javascript... I couldn't make it do much useful, as it seems there's some kind of limited JS environment that code executes in. The worst I could do was:
div {
background: `process.kill(-1, "SIGKIL")`;
}
The "fs" object does not seem to exist there, but I don't know enough about node.js/V8 environment to see whether there's equivalent of jailbreaks.So, uh, don't compile arbitrary LESS files and send users their output, and LESS files someone sends you or checks into a project can kill your processes (at least).