security: Path traversal in JpaUnarchiver — no filename sanitization #72
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: CRITICAL
JpaUnarchiverreads the file path directly from the JPA binary header and uses it raw to construct the output path:A maliciously crafted JPA file with a path like
../../../../etc/cron.d/pwnedwould write files outside the staging directory.Fix
Sanitize
$path— reject absolute paths and../sequences, validaterealpath()stays within$this->outputDir.File
src/Engine/JpaUnarchiver.php:211,230