Review main Merged

97737[SECURITY] Prevent path traversal via sha1 in import file

Benjamin Franzke CR +2 V +2 Normal +109 −1 updated 11/17/26, 10:56

Commit message

Import::writeSysFileRecords() concatenated the sha1 field
from an import file directly into a filesystem path without
proper format validation. As a result, a crafted sha1 value
containing path traversal sequences (e.g. '../../shell.php')
caused arbitrary content being written outside the designated
temporary folder.

When the target resolved within a FAL storage, the handling in
LocalDriver::addFile() threw before the rename, leaving the
payload at the traversal destination - a direct arbitrary file
write primitive.

The fix validates that sha1 is a 40-character hex string before
use. Any record whose sha1 fails this check is skipped and an
error is logged.

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
  • Verified V +2 Done
    • Benjamin Franzke +2

Issues 1

Files 2

Review log 2

  1. Benjamin Franzke wrote 11/17/26, 10:55

    Hashtag added: sec-2026-11
  2. Benjamin Franzke merged patch set 2 11/17/26, 10:56