I found a command injection vulnerability in Linux. The system does not allow any white space characters meaning

The following command works:


But I want to provide command with space, like:

;ls -l

Since it does not allow spaces, it does not work. I tried with multiple options like Hexa for space, octal, using /NULL characters /a, /t, etc but nothing works.

In brief, is there any possibility to type multiple shell commands with no spaces in bash shell?

In more details, this is webapp which talks to Linux directly. What ever I enter in webapps - it will reflect in Linux command prompt. If I enter

;ls -a (it does not work due to space)
;ls;ifconfig; (it works and shows both commands)
  • You really provide us with very little to go on. Is this injection through a web app and if not, what? What is removing the whitespace? – Neil Smithline Dec 23 '15 at 3:09
  • This sounds like a superuser question because it is basically a question about bash. – schroeder Dec 23 '15 at 3:44

The following line includes no spaces, yet in plain bash it should run ls -l:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy