All vulnerabilities

Servers and applications

GHSA-q8w8-6cq5-j4h2

Scheduler\Job::createLockFile() follows symlinks in the world-writable system temp directory (local symlink attack)

Severity
Low
Published
10 Aug 2026
Last changed
10 Aug 2026
Added to UpHeron
3 Nov 2026
Fixed in
2.0.16
Weakness
Link following (CWE-59)
Sources
Project advisories (GitHub)

Description

Grav\Common\Scheduler\Job::createLockFile() writes the job's overlap-prevention lock file with a plain file_put_contents($this->lockFile, $content) call, no check for whether $this->lockFile is already a symlink. The lock file's default directory is sys_get_temp_dir() (world-writable on typical Linux setups, /tmp), and its filename is derived directly from the job's $id, which for any job constructed with an explicit ID (the normal, documented way to use Job, and the only way onlyOne()'s overlap protection is meaningful for a recurring named task) is a predictable, human-chosen string, hyphenize($id) . '.lock'.

A local attacker who can write to the shared temp directory, another tenant on shared hosting, or another local account, can pre-create a symlink at the predictable lock file path pointing at any file the web server process can write to.

From getgrav/grav's security advisory. Shortened; the full text is there.

Affected software

SoftwareAffected versions
GravServers and applications · github:getgrav/grav
  • Every version before 2.0.16

About Grav

free software content management system written in PHP

From Wikidata, CC0 1.0.
Monthly downloads (Packagist)
1,748Packagist, 15 Nov 2026
Total downloads (Packagist)
92,444Packagist, 15 Nov 2026
GitHub stars
15,725GitHub, 15 Nov 2026
Forks
1,430GitHub, 15 Nov 2026
Latest release
2.2.29GitHub, 15 Nov 2026
Released
11 Nov 2026GitHub
License
MIT LicenseWikidata
Written in
PHPWikidata
First published on GitHub
2 Aug 2014GitHub

References