Skip to content
File upload Write-up Intermediate

Opportunistic Exploitation Of Wso2 Cve 2022 29464

An unrestricted file upload vulnerability in WSO2 products allowed unauthenticated remote attackers to upload a malicious JSP web shell via a directory traversal in the filename, leading to remote code execution. Attackers were observed exploiting this in the wild to drop web shells and coin miners.

rapid7.com

Published on rapid7.com

On April 18, 2022, MITRE published CVE-2022-29464 , an unrestricted file upload vulnerability affecting various WSO2 products. WSO2 followed with a security advisory explaining the vulnerability allowed unauthenticated and remote attackers to execute arbitrary code in the following products:

Rapid7, on rapid7.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 file upload endpoint failed to validate the file type and allowed directory traversal in the filename, enabling attackers to write executable files to a web-accessible directory.

Impact

Attackers could execute arbitrary code remotely without authentication, and in the wild they dropped web shells and coin miners on both Windows and Linux systems.

What the attacker needed

Target runs a vulnerable WSO2 product; No authentication required; Network access to the WSO2 server

The fix

WSO2 released a security advisory with remediation instructions; if patching is not possible, remove the installations from the public internet.

How it was found

  1. Send a POST request to /fileupload/toolsAny with a malicious JSP file, using a filename that includes directory traversal to place the file in a web-accessible directory.
  2. Access the uploaded web shell at a known URL (e.g., /authenticationendpoint/r7.jsp) to execute commands on the server.

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.

A file upload feature on a WSO2 server did not properly check what kind of file was being uploaded or where it was saved. Attackers could upload a malicious script (a web shell) that let them run commands on the server, effectively taking control of it.

What is File upload?

An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.

Similar reports

View all

Same bug class and techniques, clearest first.

Unrestricted file upload

The lesson behind this report.

An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.