Skip to content
SQL injection Disclosed report Advanced

Type Juggling -> PHP Object Injection -> SQL Injection Chain

A type juggling flaw in ExpressionEngine let user-supplied data reach an unserialize call, enabling PHP object injection. The attacker could then chain this to SQL injection.

Justin Kennedy Follow

Originally disclosed on HackerOne

  • Fixed in 10 hours
  • Disclosed after 6 days

Summary by the program

Justin Kennedy identified a Type Juggling vulnerability in ExpressionEngine that allowed access to unserialize using user supplied data, ultimately achieving SQL Injection. The full details of this vulnerability can be found here: https://foxglovesecurity.com/2017/02/07/type-juggling-and-php-object-injection-and-sqli-oh-my/

The original report as published on HackerOne, by jstnkndy. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely a loose comparison allowed user input to reach an unserialize call, and the resulting object data was later used unsafely in a SQL query.

Impact

An attacker could achieve SQL injection.

What the attacker needed

ExpressionEngine with the vulnerable code

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 report has not been written yet. The Original tab links to the source.

Type juggling is when a program compares values loosely and treats different types as equal, so a check can be bypassed. Here that let attacker-controlled data reach a function that rebuilds PHP objects from text, which is dangerous because it can trigger unexpected code paths. The chain ended in SQL injection, meaning the attacker could alter database queries.

What is SQL injection?

Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.

More from ExpressionEngine

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

SQL injection

The lesson behind this report.

Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.