Skip to content
RCE Write-up Beginner

Proof of Concept (PoC) : CVE-2023–31122

The report claims that Apache 2.54 on Laragon is vulnerable to CVE-2023-31122, allowing directory traversal and command injection. However, the demonstrated issues stem from deliberately insecure PHP test files that include user input and execute system commands, not from Apache itself.

medium.com

Published on medium.com

Cybersecurity continues to be a critical concern in today’s increasingly digital landscape. One of the most dangerous vulnerabilities discovered recently is CVE-2023–31122, a Remote Code Execution (RCE) vulnerability in specific versions of the Apache server.

Raihan Caesario Ammar Saputra, on medium.com

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 PHP test scripts directly use user-supplied input in include and system calls without validation, rather than a flaw in Apache itself.

What the attacker needed

Laragon with Apache 2.54; Insecure test.php and vulnerable.php files

The fix

The test scripts should validate and sanitise user input, and Apache should be updated to the latest version.

How it was found

  1. Set up Laragon with Apache version 2.54 and create test.php and vulnerable.php.
  2. Request test.php with a file parameter pointing to a Windows system file to read it.
  3. Request vulnerable.php with a cmd parameter set to dir to execute a command.

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.

This write-up says an old Apache web server has a serious bug that lets attackers read files and run commands. But the examples actually use two test PHP scripts that were written to be unsafe: one includes whatever file the user asks for, and the other runs whatever command the user sends. So the problem is in those scripts, not in Apache.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.