# CVE-2015-1340: chmod race in doUidshiftIntoContainer

- Priority: **Routine**
- Reason: Not severe (CVSS 7, physical access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2019-04-22 · Modified: 2024-09-17
- Aliases: GHSA-8mpq-fmr3-6jxv, GO-2021-0071
- Record: https://cvemate.com/vulnerability/CVE-2015-1340 · JSON: https://cvemate.com/vulnerability/CVE-2015-1340/json

## Description

```text
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.
```

## Signals

- CVSS: 8.1 high (v3.0, NVD) CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
- EPSS: 0.896%, percentile 60.802%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- github.com/lxc lxd (Go): \< 0.0.0-20151004155856-19c6961cc101
- linuxcontainers lxd: na
- ubuntu lxd: ≥ unspecified, \< 0.19-0ubuntu5

## References

- <https://github.com/lxc/lxd/commit/19c6961cc1012c8a529f20807328a9357f5034f4>
- <https://nvd.nist.gov/vuln/detail/CVE-2015-1340>
- <https://github.com/lxc/lxd/pull/1189>
- <https://bugs.launchpad.net/ubuntu/+source/lxd/+bug/1502270>
- <https://github.com/lxc/lxd>
- <https://pkg.go.dev/vuln/GO-2021-0071>

---

Data as of 2026-12-05T03:26:24.413Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
