Skip to content

SimpleSAMLphp casserver FileSystemTicketStore path traversal allows out-of-ticket-directory read/unserialize and conditional deletion

High severity GitHub Reviewed Published May 14, 2026 in simplesamlphp/simplesamlphp-module-casserver

Package

composer simplesamlphp/simplesamlphp-module-casserver (Composer)

Affected versions

<= 7.0.2

Patched versions

7.0.3

Description

Summary

simplesamlphp-module-casserver builds file paths for the file-based CAS ticket store by directly concatenating the configured ticket directory with an attacker-controlled ticket identifier. Public CAS validation/proxy endpoints pass attacker-controlled ticket / pgt query parameters into this store.

In deployments using FileSystemTicketStore, a remote attacker can use path traversal sequences such as ../target.serialized to make the CAS server read and unserialize files outside the ticket directory. In the CAS 1.0 validation flow, the same attacker-selected path is also passed to deleteTicket() immediately after getTicket() returns, which can delete the target file when it is readable by the PHP process, deletable under the PHP process filesystem permissions, and unserializes to a value compatible with the ?array return type.

Preconditions

The demonstrated issue requires:

  • the casserver module to be enabled;
  • the file-based ticket store to be configured (FileSystemTicketStore);
  • public CAS validation/proxy endpoints to be reachable;
  • the PHP process to have filesystem permissions for the target path.
  • for the demonstrated CAS 1.0 deletion impact, getTicket() must return without throwing; practically, the target file must contain serialized PHP data that unserializes to a value compatible with the ?array return type, such as an array or null. Full CAS semantic validation is not required for deletion in CAS 1.0 because deleteTicket($ticket) is called immediately after getTicket($ticket).

The attacker does not need administrator access to SimpleSAMLphp.

Impact

Affected deployments can allow remote attackers to escape the configured CAS ticket directory through public ticket validation inputs.

Confirmed impact:

  • read and unserialize files outside the ticket cache when the file content is valid serialized PHP data;
  • delete attacker-selected files outside the ticket cache through the CAS 1.0 validation flow when the target is readable by the PHP process, deletable under the PHP process filesystem permissions, and the target content unserializes to a value compatible with the ?array return type, such as a serialized array or serialized null. Full CAS semantic validation is not required before deletion in the CAS 1.0 flow.

The file deletion impact depends on filesystem permissions of the PHP process. In realistic deployments, this can destroy CAS tickets, serialized SimpleSAMLphp runtime/cache files, or other writable files whose contents can be unserialized into a value accepted by the ?array return type. It may also delete attacker-created files outside the ticket directory if the attacker has another primitive to place such serialized content.

The unserialize() call creates a dangerous secondary primitive if an attacker can place a serialized object file at a reachable path, although this report does not claim a complete object-injection or RCE chain.

References

Published to the GitHub Advisory Database May 15, 2026
Reviewed May 15, 2026

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

EPSS score

Weaknesses

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. Learn more on MITRE.

CVE ID

CVE-2026-46491

GHSA ID

GHSA-jrrg-99xh-5j2q

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.