Skip to content

Misconfigured Access-Control-Allow-Origin Header

Moderate
samuelwei published GHSA-pgfw-f4mp-5445 Oct 27, 2025

Package

docker pilos/pilos (Docker)

Affected versions

<4.8.0

Patched versions

4.8.0

Description

Impact

PILOS includes a Cross-Origin Resource Sharing (CORS) misconfiguration in its middleware: it reflects the Origin request header back in the Access-Control-Allow-Origin response header without proper validation or a whitelist, while Access-Control-Allow-Credentials is set to true. This behavior could allow a malicious website on a different origin to send requests (including credentials) to the PILOS API.

This may enable exfiltration or actions using the victim’s credentials if the server accepts those cross-origin requests as authenticated.

Laravel’s session handling applies additional origin checks such that cross-origin requests are not authenticated by default. Because of these session-origin protections, and in the absence of any other unknown vulnerabilities that would bypass Laravel’s origin/session checks, this reflected-Origin CORS misconfiguration is not believed to be exploitable in typical PILOS deployments.

Patches

This vulnerability has been patched in PILOS in v4.8.0

Workarounds

Remove CORS headers in reverse proxy.

NGINX

location / {
   proxy_pass          http://127.0.0.1:5000;
   proxy_set_header    X-Forwarded-Host $host;
   proxy_set_header    X-Forwarded-Port  $server_port;
   proxy_set_header    X-Forwarded-For   $proxy_add_x_forwarded_for;
   proxy_set_header    X-Forwarded-Proto $scheme;
+  proxy_hide_header Access-Control-Allow-Origin;
+  proxy_hide_header Access-Control-Allow-Credentials;
   proxy_http_version  1.1;
}

APACHE

   ProxyPreserveHost On

   ProxyPass "/"  "http://127.0.0.1:5000/" nocanon
   ProxyPassReverse "/"  "http://127.0.0.1:5000/"

   RequestHeader set X-Forwarded-Proto "https"
   RequestHeader set X-Forwarded-Port "443"

+  Header unset Access-Control-Allow-Origin
+  Header unset Access-Control-Allow-Credentials

Severity

Moderate

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
None
User interaction
Required
Scope
Unchanged
Confidentiality
Low
Integrity
Low
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:N/UI:R/S:U/C:L/I:L/A:L

CVE ID

CVE-2025-62523

Weaknesses

Permissive Cross-domain Security Policy with Untrusted Domains

The product uses a web-client protection mechanism such as a Content Security Policy (CSP) or cross-domain policy file, but the policy includes untrusted domains with which the web client is allowed to communicate. Learn more on MITRE.