Skip to content

Arbitrary File Upload Leading to Multiple Critical Vulnerabilities (SSRF, Stored XSS)

High
mjashanks published GHSA-2hfr-343j-863r Mar 9, 2026

Package

Budibase (TypeScript)

Affected versions

3.24.0

Patched versions

None

Description

Summary

An arbitrary file upload vulnerability exists even though file extension restrictions are configured. An attacker can bypass these restrictions and upload malicious files, leading to multiple critical attacks including Stored XSS and SSRF. This can result in account takeover, data leakage, and compromise of internal systems.

Details

However, this restriction is enforced only at the UI level. When the upload request is intercepted and modified using tools like Burp Suite, it is possible to bypass the extension filter and upload arbitrary and potentially malicious files.

By modifying the request:

  1. Files with disallowed extensions such as .html, .svg, .php, .exe, .msi, .bat, .cmd, etc., can be uploaded.
  2. Double extensions like payload.png.html, image.jpg.svg, or file.png.exe are accepted.
  3. MIME type can be spoofed (e.g., setting Content-Type: image/png while sending malicious or executable content).
  4. After upload, the file is successfully stored and accessible, which confirms that the backend does not properly validate the file type based on real extension, MIME type, or file content.

This arbitrary file upload can then be abused to perform multiple critical attacks:

  • Stored XSS:
    Uploading HTML or SVG files with JavaScript causes stored XSS when any user views the uploaded file.

  • Malware Distribution:
    Executable files such as .exe, .msi, .bat, etc., can be uploaded and shared, leading to malware distribution through the application.

  • SSRF:
    Specially crafted files (e.g., SVG/HTML referencing external URLs) can force the server to make requests to attacker-controlled or internal URLs.

This shows that even though file extension restrictions are configured in the form component to prevent dangerous file types, they are not enforced securely on the backend, leading to arbitrary file upload and multiple critical vulnerabilities.

PoC

  1. Log in using an admin account and create a new application. Add a Form component, then locate the “Badge Photo” field and click on the settings (gear) icon for that field.
image
  1. Observe that we have configured the valid file extensions according to the documentation at
    https://docs.budibase.com/docs/attachment
image
  1. Now log in using a user account that has only the “App User” role, not an admin role.
image image
  1. Navigate to the application and fill the required details as per highlighted.
image
  1. Click on the "File Upload" and observe that only jpg, png, gif, webp files are allowed.
image
  1. Now upload valid file and change the extension from ".jpg" to ".svg" and change the content-type to "image/svg+xml". Append the below payload in the body.
<svg xmlns="http://www.w3.org/2000/svg" width="400" height="400" viewBox="0 0 124 124" fill="none">
<rect width="124" height="124" rx="24" fill="#000000"/>
   <script type="text/javascript">  
      alert(0x539);
   </script>
</svg>

image image image
  1. Observe that the svg file was attached successfully. Click on the save and observe that successfully form was saved without any error.
image
  1. Now from the admin user, navigate to submitted data and click on the badge photo.
image image
  1. Right click on that image and copy the link address. Open the pasted link on the browser and observe that popup was triggered. Its and instance of Stored XSS.
image image
  1. Now using the same method upload the malicious file and observe that file was downloaded file from the admin account.
image image * Observe that "Eicher Virus" Payload has been append. image image image
  1. Using the same method, append the SSRF payload to the uploaded file. If that file is opened by an admin user, we will be able to capture the IP address of that admin user.
image image image image image image image

Impact

This vulnerability allows an attacker to upload and store arbitrary files despite file extension restrictions being configured in the application. As a result, the attacker can abuse the upload functionality to perform multiple critical attacks.

Account Takeover:
Stored XSS can be used to steal session cookies or tokens of users and administrators, allowing full account compromise.

Remote Code and Malware Distribution:
Malicious executable files such as .exe, .msi, .bat, etc., can be uploaded and shared, turning the application into a malware distribution platform.

Internal Network Exposure:
Through SSRF, the attacker can force the server to make requests to internal services, cloud metadata endpoints, or private IP ranges.

Data Theft and Privacy Breach:
XSS and SSRF can be used to steal sensitive user data, internal tokens, configuration details, and other confidential information.

Overall, this vulnerability represents a critical risk as it enables multiple attack vectors from a single entry point and can lead to complete compromise of users, data, and internal infrastructure.

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
Low

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:L

CVE ID

CVE-2026-25737

Weaknesses

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. Learn more on MITRE.

Unrestricted Upload of File with Dangerous Type

The product allows the upload or transfer of dangerous file types that are automatically processed within its environment. Learn more on MITRE.

Server-Side Request Forgery (SSRF)

The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination. Learn more on MITRE.

Credits