LightBlog <= 9.9.2 (register.php) PHP Code Injection Vulnerability
LightBlog's register.php stored user-supplied input from several parameters into a PHP file without sanitising it. An attacker could therefore inject PHP code that the server would later execute.
karmainsecurity.com
Published on karmainsecurity.com
LightBlog contains a flaw that allows malicious users to execute arbitrary PHP code. The issue is due to user-supplied input passed via multiple parameters to register.php is not properly sanitized before being stored within a php file.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the registration handler wrote raw request parameters into a PHP source file without escaping or validating them, so injected PHP syntax became executable code.
Impact
An attacker could execute arbitrary PHP code on the server, which typically means full control of the web application and its data.
What the attacker needed
Reachable register.php; no authentication needed
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
The blog software took text a visitor typed into its registration form and saved it straight into a program file on the server. Because that text was never cleaned, someone could type in code instead of normal text, and the server would later run that code as if the site's own author had written it.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.