Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Tools/GitHubGitHub/bitterzzzz/cve-2021-43297-poc
Vulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingPayload Development
GitHubbitterzzzz/cve-2021-43297-poc

CVE-2021-43297-POC

Proof-of-concept exploit for CVE-2021-43297, achieving remote code execution in Apache Dubbo <= 2.7.13 via Hessian-Lite deserialization.

View Repository
39874 years agoReviewed by Kitploit

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2021-43297

Vulnerability Description

Apache Dubbo Hessian-Lite 3.2.11 and earlier versions contain a potential RCE attack risk. When Hessian-Lite encounters a serialization exception, it outputs related information, which may trigger the toString method of certain maliciously crafted Beans, leading to an RCE attack.

Principle

The initial POC could only achieve RCE on Apache Dubbo <= 2.7.8. The principle is described in the 先知 article (will be updated after review approval). After submitting, further research was conducted, and RCE can now be achieved on Apache Dubbo <= 2.7.13. The principle analysis can be found in my blog post

The effect is as follows

POC exploitation conditions:

  • apache dubbo <= 2.7.13 or the corresponding alibaba dubbo version
  • Know the IP and port of the dubbo provider, and be able to access it
  • The dubbo provider has the XBean chain
  • The dubbo provider server allows outbound HTTP GET requests

Environment Setup and POC Execution

  • First, download zookeeper
wget http://archive.apache.org/dist/zookeeper/zookeeper-3.3.3/zookeeper-3.3.3.tar.gz
tar zxvf zookeeper-3.3.3.tar.gz
cd zookeeper-3.3.3
cp conf/zoo_sample.cfg conf/zoo.cfg
  • Configuration
vim conf/zoo.cfg
# The number of milliseconds of each tick
tickTime=2000
# The number of ticks that the initial
# synchronization phase can take
initLimit=10
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
syncLimit=5
# the directory where the snapshot is stored.
dataDir=/absolute/path/zookeeper-3.3.3/data
# the port at which the clients will connect
clientPort=2181
  • Modify the absolute path, and place a myid file in the data directory
mkdir data
touch data/myid
  • Start zookeeper
cd /private/var/tmp/zookeeper-3.3.3/bin
./zkServer.sh start
  • Install dubbo-samples-api
git clone https://github.com/apache/dubbo-samples.git
cd dubbo-samples/dubbo-samples-api
  • Modify dubbo-samples/dubbo-samples-api/pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.example</groupId>
    <artifactId>dubbomytest</artifactId>
    <packaging>pom</packaging>
    <version>1.0-SNAPSHOT</version>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>8</source>
                    <target>8</target>
                </configuration>
            </plugin>
        </plugins>
    </build>


    <properties>
        <source.level>1.8</source.level>
        <target.level>1.8</target.level>
        <dubbo.version>2.7.6</dubbo.version>
        <junit.version>4.12</junit.version>
        <docker-maven-plugin.version>0.30.0</docker-maven-plugin.version>
        <jib-maven-plugin.version>1.2.0</jib-maven-plugin.version>
        <maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
        <maven-failsafe-plugin.version>2.21.0</maven-failsafe-plugin.version>
        <image.name>${project.artifactId}:${dubbo.version}</image.name>
        <java-image.name>openjdk:8</java-image.name>
        <dubbo.port>20880</dubbo.port>
        <zookeeper.port>2181</zookeeper.port>
        <main-class>org.apache.dubbo.samples.provider.Application</main-class>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.apache.dubbo</groupId>
            <artifactId>dubbo</artifactId>
            <version>2.7.3</version>
        </dependency>
        <dependency>
            <groupId>org.apache.dubbo</groupId>
            <artifactId>dubbo-common</artifactId>
            <version>2.7.3</version>
        </dependency>

        <dependency>
            <groupId>org.apache.dubbo</groupId>
            <artifactId>dubbo-dependencies-zookeeper</artifactId>
            <version>2.7.3</version>
            <type>pom</type>
        </dependency>
        <dependency>
            <groupId>org.apache.xbean</groupId>
            <artifactId>xbean-naming</artifactId>
            <version>4.15</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>

    </dependencies>

</project>
  • xbean package

Both the provider side and the local environment need to install it, with the dependency as follows

<dependency>
    <groupId>org.apache.xbean</groupId>
    <artifactId>xbean-naming</artifactId>
    <version>4.15</version>
</dependency>
  • Compile and start

Add dubbo-samples-api in IDEA, note that you need to modify the zookeeper and dubbo ports, and also modify the code in Application.java:

service.setRegistry(new RegistryConfig("zookeeper://" + zookeeperHost + ":" + zookeeperPort+"/?timeout=250000"));

This prevents higher versions of dubbo from failing to connect due to slow zookeeper connection establishment

Start Application.java in dubbo-samples-api in IDEA

After startup, the output dubbo service started indicates that dubbo has been started

  • Run the POC Add dependencies locally:
<dependency>
   <groupId>org.apache.dubbo</groupId>
   <artifactId>dubbo-common</artifactId>
   <version>2.7.3</version>
</dependency>
<dependency>
   <groupId>org.apache.dubbo</groupId>
   <artifactId>dubbo</artifactId>
   <version>2.7.3</version>
</dependency>
<dependency>
   <groupId>org.apache.dubbo</groupId>
   <artifactId>dubbo-dependencies-zookeeper</artifactId>
   <version>2.7.3</version>
   <type>pom</type>
</dependency>
<dependency>
   <groupId>com.caucho</groupId>
   <artifactId>hessian</artifactId>
   <version>4.0.51</version>
</dependency>

Compile ExecTest.java, then modify the path of ExecTest.class in HttpServer.java, then execute the HttpServer.main method, and finally execute the HessianLitePoc.main method

Download Tool