Intel

AIKIDO-2026-501569

spiral/session is vulnerable to Path Traversal

Path TraversalGHSA-c84m-p8px-4wpx Published Aug 10, 2026

98

Critical Risk

This Affects:

PHPspiral/session
2.6.0 - 3.13.0
Fixed in 3.13.1
3.14.0 - 3.17.0
Fixed in 3.17.1
Are you affected? Scan for Free

TL;DR

The HTTP session component takes the session id directly from the client-supplied sid cookie, and its id validator was inert because it compared the preg_match result with !== false, so the allowlist accepted every string including path separators and .. segments. The default file-based session handler then built the on-disk path by concatenating that value without basename or realpath containment. An unauthenticated request carrying a crafted sid cookie therefore writes the serialized session outside the configured session directory, creating missing parent directories, which can escalate to remote code execution when session content is attacker-influenced and enables session fixation. The fix compares the match result with === 1 to reject invalid ids and wraps the id in basename as defense in depth.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and your application uses the default file-based session handler.

Background info

spiral/session is vulnerable to Path Traversal in versions 2.6.0 - 3.13.0 and 3.14.0 - 3.17.0.

How to fix this

Upgrade the spiral/session and/or the spiral/framework library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform