Vulnerability · Published Mar 18, 2024 · Assigned by GitHub_M

CVE-2023-41334astropy vulnerable to RCE in TranformGraph().to_dot_graph function

High 8.4

In plain English

A high-severity command injection in astropy from astropy. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 1.1% (higher than 67% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)8.4High
Exploit odds (30 days)1.1%top 33.4% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official description

Astropy is a project for astronomy in Python that fosters interoperability between Python astronomy packages. Version 5.3.2 of the Astropy core package is vulnerable to remote code execution due to improper input validation in the `TranformGraph().to_dot_graph` function. A malicious user can provide a command or a script file as a value to the `savelayout` argument, which will be placed as the first value in a list of arguments passed to `subprocess.Popen`. Although an error will be raised, the command or script will be executed successfully. Version 5.3.3 fixes this issue.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12astropyno fix listedDEBIAN-CVE-2023-41334
Debian:13astropy5.3.3-1DEBIAN-CVE-2023-41334
Debian:14astropy5.3.3-1DEBIAN-CVE-2023-41334
PyPIastropy5.3.3GHSA-h2x6-5jx5-46hf
PyPIastropy5.3.3PYSEC-2026-1199
Ubuntu:22.04:LTSastropyno fix listedUBUNTU-CVE-2023-41334

Affected products (as reported)

VendorProductVersions
astropy astropy = 5.3.2

Weakness: CWE-77 · Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

References