CVE-2026-113724: virtualenv: Deletion recovery can change a symlink target's mode

Published Oct 20, 2026
·
Updated

virtualenv is a tool for creating isolated virtual python environments. Prior to 21.14.9, the safedelete() deletion error handler responds to a failed removal by reading mode bits with os.lstat(path) and applying owner-write permission with os.chmod(path, ...), which follows a symlink. A planted link inside a read-only directory can therefore cause a victim-owned target outside the destination that is initially not writable by the invoking user to become broadly writable before the retry fails, provided that user owns the target and can change its mode. Another account can use the widened mode only if it can traverse the target's parent directories; root does not reach the demonstrated failure path, and the operation does not itself read the target. This issue is fixed in version 21.14.9.

Affected Software

1 affected component
pypi/virtualenv<21.14.9

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade virtualenv to a version that resolves this vulnerability.

    Fixed in 21.14.9

Event History

Oct 20, 2026
CVE Published
via MITRE·07:53 PM
Data Sourced
via MITRE·07:53 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:17 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Who is realistically exposed to this issue?

Users running virtualenv versions earlier than 21.14.9 may be exposed when a planted symlink exists inside a read-only directory and points to a victim-owned file outside the deletion destination. The invoking user must own the target and be permitted to change its mode; root does not reach the demonstrated failure path.

2

What does an attacker need to do to exploit it?

An attacker needs to plant a symlink in the directory being processed such that deletion fails and triggers virtualenv's recovery handler. The symlink must point to a target owned by the user invoking virtualenv that is initially not writable by that user.

3

What is the practical impact of the permission change?

The recovery handler can make the symlink target broadly writable before the deletion retry fails. A different account can use that widened access only if it can traverse the target's parent directories; the operation does not read the target itself.

4

What should be done if the affected version is in use?

Upgrade virtualenv to version 21.14.9 or later. Until then, avoid running affected versions against deletion destinations where untrusted users can plant symlinks, particularly within read-only directories.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203