Skip to content
RCE Write-up Advanced

[Blog] Exploiting Adobe ColdFusion before CVE-2017-3066

The report describes how to exploit Adobe ColdFusion before CVE-2017-3066 by finding alternative deserialization gadgets that do not require an outgoing TCP connection. An attacker could achieve remote code execution by sending a crafted AMF message that triggers Java deserialization of untrusted data.

code-white.com

Published on code-white.com

In a recent penetration test my teammate Thomas came across several servers running Adobe ColdFusion 11 and 12. Some of them were vulnerable to CVE-2017-3066 but no outgoing TCP connections were possible to exploit the vulnerability.

The author, on code-white.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 lack of class whitelisting during AMF deserialization allows arbitrary classes to be instantiated, and some of these classes have side effects that lead to further deserialization or code execution.

Impact

An attacker could execute arbitrary code on the server, potentially gaining a SYSTEM shell, but the exploit requires that the server has the vulnerable classes in its classpath and may be limited to specific ColdFusion versions.

What the attacker needed

Adobe ColdFusion 11 or 12; No outgoing TCP connections needed; Vulnerable classes in classpath

The fix

Apache introduced validation through the class flex.messaging.validators.ClassDeserializationValidator with a default whitelist.

How it was found

  1. Identify that the target runs Adobe ColdFusion 11 or 12.
  2. Find a class in the classpath that implements java.io.Externalizable or follows JavaBeans conventions and can be abused.
  3. Craft an AMF message that includes the malicious class and its serialized data.
  4. Send the AMF message to the ColdFusion server.
  5. The server deserializes the message, triggering the exploit and leading to remote code execution.

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.

Adobe ColdFusion is a web application server. It uses a binary format called AMF to exchange data with Flash clients. The server deserializes this data without checking which classes are allowed, so an attacker can send a message that makes the server create objects of dangerous classes, leading to code execution.

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.