Skip to content

GHSA-fj24-ghp9-39v3 CVE-2013-4259 PYSEC-2013-1

Ansible uses a socket with predictable filename in /tmp

Medium PyPI
Severity
0.0 / 10
Medium · CVSS 4.0
Exploit chance (EPSS)
0.34%
Chance of exploitation in the next 30 days. Higher than 27.69% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-330 Use of Insufficiently Random Values
Fix
1.2.3
Upgrade ansible to this version or later

Description

runner/connection_plugins/ssh.py in Ansible before 1.2.3, when using ControlPersist, allows local users to redirect a ssh session via a symlink attack on a socket file with a predictable name in /tmp/.

Affected versions

PyPI

PackageVulnerableFixed in
ansible
< 1.2.3
1.2.3

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

ansible PyPI → 1.2.3

pip
pip install --upgrade "ansible>=1.2.3"
poetry
poetry add "ansible>=1.2.3"
uv
uv add "ansible>=1.2.3"

Severity breakdown

CVSS 4.0 0.0

CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N

Attack vector
Local
Attack complexity
Low
Attack requirements
Present
Privileges required
None
User interaction
None
Confidentiality (vulnerable system)
None
Integrity (vulnerable system)
Low
Availability (vulnerable system)
None
Confidentiality (subsequent systems)
None
Integrity (subsequent systems)
None
Availability (subsequent systems)
None

CVSS 3.1 4.0

CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

Attack vector
Local
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
None

Weakness

CWE-330: Use of Insufficiently Random Values

The product uses insufficiently random numbers or values in a security context that depends on unpredictable numbers.

How to prevent it
  • Architecture and Design: Use a well-vetted algorithm that is currently considered to be strong by experts in the field, and select well-tested implementations with adequate length seeds. In general, if a pseudo-random number generator is not advertised as being cryptographically secure, then it is probably a statistical PRNG and should not be used in security-sensitive contexts. Pseudo-random number generators can produce predictable numbers if the generator is known and the seed can be guessed. A 256-bit seed is a good starting point for producing a "random enough" number.
  • Implementation: Consider a PRNG that re-seeds itself as needed from high quality pseudo-random output sources, such as hardware devices.
  • Architecture and Design, Requirements: Use products or modules that conform to FIPS 140-2 [REF-267] to avoid obvious entropy problems. Consult FIPS 140-2 Annex C ("Approved Random Number Generators").

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-8ggh-xwr9-3373
Ansible Community General Collection is vulnerable to exposure of sensitive information
Medium Also affects ansible
GHSA-jpvw-p8pr-9g2x
Ansible symlink attack vulnerability
Medium Also affects ansible
GHSA-cpx3-93w7-457x
Ansible leaks password to logs
High Also affects ansible
GHSA-fh5v-5f35-2rv2
Insertion of Sensitive Information into Log File in ansible
Medium Also affects ansible
GHSA-4r65-35qq-ch8j
Ansible discloses sensitive information in traceback error message
Medium Also affects ansible
GHSA-2pfh-q76x-gwvm
Improper Input Validation and Command Injection in Ansible
High Also affects ansible
PYSEC-2021-126
A flaw was found in Ansible if an ansible user sets ANSIBLE_ASYNC_DIR to a subdirectory of a world writable directory.
Not rated yet Also affects ansible
GHSA-r6h7-5pq2-j77h
Insufficiently random values in Ansible
Medium Also affects ansible
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor