Severity:

HIGH RISK

(7.3)

SSRF in BuildingAI Remote Upload API

CVE-2026-7065

Deferred

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-918

Impact:

Unauthorized network access via SSRF, potentially leading to data exposure and lateral movement

Severity:

HIGH RISK

(7.3)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A server-side request forgery (SSRF) vulnerability in BuildingAI's Remote Upload API allows attackers to control the URL parameter used by the backend to fetch remote files.

When abused, this can coerce the server into making arbitrary outbound HTTP requests, potentially reaching internal services or metadata endpoints that are not directly exposed to the internet.

Affected context

The vulnerability resides in the uploadRemoteFile function within packages/core/src/modules/upload/services/file-storage.service.ts of the BuildingAI application.

It affects deployments where the Remote Upload API is exposed and accepts a user-provided url parameter that the server then uses to download content.

Risk increases in environments where the application server can reach internal services, cloud metadata endpoints, or other sensitive network locations not intended for public access.

Exploit preconditions

  • Attack surface: The Remote Upload API endpoint that supports fetching files from a user-supplied URL.
  • Required access: Ability to send HTTP requests to the affected API (typically over the public internet or from any client that can reach the service).
  • Trigger point: Supplying a crafted url argument that points to internal or otherwise sensitive network locations.
  • Why exploitation is possible: The implementation forwards the user-controlled url directly to server-side HTTP client logic without sufficient validation, restriction, or network-level egress controls, enabling arbitrary outbound requests from the server's network context.

Why this happens

This issue is a classic instance of CWE-918: Server-Side Request Forgery (SSRF).

The uploadRemoteFile function appears to trust the url parameter and uses it directly to initiate server-side HTTP requests.

Without robust validation (such as strict allowlists, hostname/IP checks, and scheme enforcement) and without isolating outbound network access, user input effectively controls where the server connects.

This breaks the intended network trust boundaries by turning the application into a proxy capable of reaching targets the attacker cannot access directly.

Potential impact

  • The server may be used to probe and scan internal network services that are not exposed externally.
  • Attackers could access sensitive internal HTTP endpoints, such as admin panels, APIs, or debugging interfaces.
  • In cloud environments, the vulnerability can potentially reach metadata services, which may lead to credential exposure and privilege escalation.
  • The server could be abused as part of a pivoting strategy for further lateral movement within the infrastructure.
  • The application might be coerced into interacting with attacker-controlled endpoints, enabling secondary attacks such as response-based data exfiltration or logging-based injection.

General mitigation guidance

Effective mitigation centers on strictly controlling how remote URLs are accepted and used by server-side components:

  • Apply a positive security model (allowlist) for outbound destinations or domains that the Remote Upload API is allowed to contact.
  • Enforce URL validation rules, including allowed schemes (e.g., HTTPS only), disallowing IP literals, localhost, and private or link-local address ranges.
  • Perform DNS resolution and IP range checks server-side before making any outbound request, and re-validate post-resolution to prevent DNS rebinding issues.
  • Separate and constrain egress network access for the service using firewall rules, VPC controls, or container-level network policies, so that the component cannot reach sensitive internal systems by default.
  • Consider replacing generic "download from arbitrary URL" functionality with controlled integration endpoints or pre-registered sources, reducing or eliminating user-controlled destination URLs.
  • Log and monitor outbound requests from this feature, and alert on suspicious patterns such as requests to internal IP ranges or unusual hostnames.

How teams detect issues like this

Detection of SSRF issues typically combines code-centric and environment-centric approaches:

  • Static analysis and code review:
  • Flag functions where user-supplied URL or host parameters are passed into HTTP clients (e.g., fetch, axios, http.request) without allowlist checks or scheme/host validation.
  • Identify upload or import flows that accept arbitrary URLs and lack explicit filtering of internal address ranges and non-HTTP protocols.
  • Review error handling and logging around remote fetches to ensure no sensitive response data is inadvertently exposed to clients.
  • Automated testing and fuzzing:
  • Use security tests that try internal addresses (e.g., 127.0.0.1, 169.254.169.254, RFC1918 ranges) and verify that the service rejects them.
  • Employ DAST tools configured with SSRF test payloads targeting local and internal endpoints.
  • Operational monitoring:
  • Monitor outbound traffic patterns from the application for unusual destinations, particularly internal IPs or cloud metadata endpoints.
  • Use network policies and egress filtering logs to detect blocked requests that originate from user-driven features like remote upload.

Sources

SourceLink
github.comgithub.com/BidingCC/BuildingAI/
github.comgithub.com/BidingCC/BuildingAI/issues/110
vuldb.comvuldb.com/submit/798621
vuldb.comvuldb.com/vuln/359640
vuldb.comvuldb.com/vuln/359640/cti

Frequently asked

questions

Yes. Any party that can reach the Remote Upload API and supply a url parameter can attempt to exploit this SSRF flaw, assuming no compensating network controls are in place.

The attacker generally needs only network access to the affected API endpoint. No special privileges are required beyond the ability to send requests that include a crafted url parameter.

The safest pattern is to avoid accepting arbitrary, user-controlled URLs altogether. If remote fetching is required, implement a strict allowlist of permitted destinations or domains, enforce robust URL validation (scheme, host, and IP checks), and combine that with restricted egress permissions so that the service cannot reach sensitive internal resources.

Establish coding standards that treat user-controlled URLs as high-risk input, require allowlist-based validation for any server-initiated outbound requests, and enforce network-layer egress restrictions by default. Incorporate SSRF-focused checks into code review, static analysis, and security testing pipelines, and favor architectures that minimize or eliminate server-side fetching of arbitrary user-specified resources.

Find out what's already
exploitable in your codebase.