GoAnywhere MFT - A Forgotten Bug
The GoAnywhere MFT administration console exposed a servlet that deserialised a user-supplied 'bundle' parameter after decrypting it with hard-coded keys, allowing an unauthenticated attacker to execute arbitrary code. The author built a working proof of concept that ran a command on the server.
Published on frycos.github.io
It all began with a toot by Brian Krebs on 2nd February, 2023, providing information on an “On Prem Notification/Technical BulletinFeb 1, 2023”. This advisory was only accessible by registered users, describing a upcoming threat originated from an 0day affecting the file transfer solution product GoAnywhere MFT.
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 servlet passed attacker-controlled, decryptable data straight into Java object deserialisation without any authentication or allow-list.
Impact
An unauthenticated attacker could achieve remote code execution on the GoAnywhere MFT server.
What the attacker needed
Network access to the admin console; no authentication needed
The fix
The vendor advised deleting the servlet definition and its URL mapping from web.xml as a temporary mitigation.
How it was found
- Find the LicenseResponseServlet definition and /lic/accept mapping in web.xml.
- Read the decompiled code to learn the hard-coded AES key, IV and PBKDF2 parameters.
- Generate a CommonsBeanutils1 gadget payload with ysoserial using the bundled commons-beanutils JAR.
- Encrypt and Base64-encode the payload with a small helper that reuses the same crypto parameters.
- Send a POST to /goanywhere/lic/accept with the encrypted blob in the bundle parameter.
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.
The product had a hidden web page that took a blob of data from the visitor, decrypted it with a key that was baked into the software, and then turned it back into a Java object. Java can rebuild objects in ways that run code, so anyone who knew the key could send a crafted blob and get their own commands to run on the server. The author found the key by reading the decompiled code.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.