Summary
Langflow versions 1.0.0 through 1.8.1 expose an image download endpoint that returns user-uploaded images without any authentication or ownership checks.
In a multi-tenant environment, an attacker who can obtain or guess a valid flow_id and file_name can download other users' images over HTTP without credentials.
Affected context
This vulnerability manifests in Langflow deployments that:
- Run versions 1.0.0 through 1.8.1
- Use the
/api/v1/files/images/{flow_id}/{file_name}endpoint to serve user-uploaded images - Operate in a shared or multi-tenant environment where different users or teams maintain separate flows
The issue is particularly relevant when images contain sensitive data (e.g., screenshots, proprietary diagrams, or other PII-like content) and when flow_id values can be inferred from other API responses or logs.
Exploit preconditions
- Attack surface: Publicly exposed HTTP API endpoint
GET /api/v1/files/images/{flow_id}/{file_name}- Required access: No authentication required; attacker only needs network access to the API endpoint
- Trigger point: Any request that supplies a valid combination of
flow_idandfile_name - Why exploitation is possible:
- The endpoint does not enforce authentication (CWE-862: Missing Authorization)
- The endpoint does not verify that the requester owns or is allowed to access the specified
flow_id(CWE-639: Insecure Direct Object Reference) - The system relies implicitly on obscurity of identifiers rather than explicit authorization checks (CWE-284: Improper Access Control)
Why this happens
At its core, this is a Broken Access Control issue where a resource-serving endpoint is implemented without any security gate.
The handler for /api/v1/files/images/{flow_id}/{file_name} directly maps URL parameters to underlying storage and returns the file with HTTP 200, regardless of:
- Whether the caller is authenticated
- Whether the caller is associated with the flow specified by
flow_id
This pattern matches:
- CWE-284: Improper Access Control, as access decisions are absent for a protected resource
- CWE-639: IDOR, because direct object references (
flow_idandfile_name) can be used to access other tenants' data - CWE-862: Missing authorization, since no role or tenant-based checks are conducted before serving the file
The abstract bug class is "resource retrieval endpoints that trust user-supplied identifiers without enforcing authentication and object-level authorization."
Potential impact
- Unauthorized retrieval of other tenants' or users' uploaded images
- Exposure of sensitive or proprietary visual content (e.g., diagrams, datasets, UI screenshots)
- Privacy violations if images contain personal or confidential information
- Facilitation of reconnaissance against flows, agents, or internal processes inferred from image content
- Potential regulatory or contractual non-compliance due to cross-tenant data disclosure
General mitigation guidance
Effective mitigation focuses on enforcing strict, explicit access control for all file-serving endpoints:
- Require authentication on file endpoints:
- Ensure that all routes serving user-uploaded content validate the caller's identity before accessing storage.
- Implement tenant- and object-level authorization:
- Bind flows (and their associated images) to a specific user or tenant.
- Verify that the authenticated principal is allowed to access the
flow_idreferenced in the request. - Avoid relying on unguessable identifiers alone:
- Treat
flow_idandfile_nameas public identifiers, not as secret tokens. - Use them only in combination with access checks, not as the sole security control.
- Centralize access control logic:
- Introduce a shared middleware or service layer responsible for enforcing authentication and ownership checks on all file and resource endpoints.
- Minimize stored sensitive content when possible:
- Encourage patterns where highly sensitive images are stored in more controlled systems, or are minimized, masked, or redacted before upload.
- Apply least privilege at the storage layer:
- Configure storage backends (local or cloud) so that application roles can access only scoped paths derived from the authenticated user/tenant context.
How teams detect issues like this
Organizations can detect and monitor this class of issue through a combination of code- and behavior-focused approaches:
- Static code review and analysis:
- Search for routes or controllers that:
- Serve files or binary content
- Use path parameters like
flow_idandfile_name - Do not invoke authentication middleware or authorization checks
- Use static analysis rules to flag handlers where request parameters map directly to filesystem or object storage access.
- Security-focused code review patterns:
- During pull requests, verify that every new file-serving endpoint:
- Requires authentication
- Uses the caller's identity to determine allowed flows/resources
- Check that endpoint definitions consistently reference shared access control middleware.
- Automated policy enforcement:
- Adopt API gateways or service meshes that can enforce authentication on certain URL patterns.
- Configure CI pipelines to run security linters or SAST tools that look for missing authorization in controllers.
- Runtime monitoring:
- Log and monitor access to
/api/v1/files/images/*paths. - Generate alerts for unusual access patterns, such as many different
flow_idvalues requested from a single IP or token, which may indicate enumeration.

