CVE-2015-1340 is a high-severity (CVSS 8.1) CWE-362 vulnerability in github.com/lxc/lxd. A fix is available for github.com/lxc/lxd — see the affected versions and patch details below.
LXD vulnerable to Race Condition
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
github.com/lxc/lxdReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
LXD before version 0.19-0ubuntu5 doUidshiftIntoContainer() has an unsafe Chmod() call that races against the stat in the Filepath.Walk() function. A symbolic link created in that window could cause any file on the system to have any mode of the attacker's choice.
Specific Go Packages Affected
github.com/lxc/lxd/shared
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/lxc/lxd | all versions | 0.0.0-20151004155856-19c6961cc101go get github.com/lxc/lxd@v0.0.0-20151004155856-19c6961cc101 |
Affected Products
lxdlinuxcontainersDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/lxc/lxd, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update github.com/lxc/lxd to 0.0.0-20151004155856-19c6961cc101 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2015-1340 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Frequently Asked Questions
Is CVE-2015-1340 in your dependencies?
Find it across Go, including transitive dependencies.