From Emil Virkki to security@
Hi,
Wikimedia maintains a popular fork of the less.php library here: https://github.com/wikimedia/less.php
I recently worked with a system that uses this library with user-supplied input. This generally doesn't cause security issues, except for the data-uri() function which allows reading arbitrary files. So for example, you could write Less code like:
.foobar { background: data-uri('/etc/passwd'); }
and this would result in the contents of the file being included in the output base64-encoded. Solving this issue would require adding a configuration setting for restricting which files can be accessed.
As this isn't an issue for most use cases of Less.php, I understand if you feel it shouldn't be handled as a security issue but rather a feature request. Just to check - do you want to take this forward or shall I just add an issue in the GitHub repository mentioned above? :)