CVE-2026-134694 in Gammapyinfo

Summary

by MITRE • 11/22/2026

Gammapy through 2.1 contains a code injection vulnerability in WcsGeom.from_header() that passes the WCSSHAPE FITS header card to eval(). Attackers can supply a crafted .fits file with a Python expression in WCSSHAPE, executing code as the user who loads it via Map.read().

Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Analysis

by VulDB Data Team • 11/22/2026

The vulnerability identified in Gammapy versions up to 2.1 represents a critical server-side request forgery and arbitrary code execution risk rooted in improper input validation within the astronomical data processing library. Specifically, the flaw resides in the WcsGeom.from_header() method, which is responsible for parsing World Coordinate System geometry information from FITS header cards. The core technical deficiency involves the direct passage of the WCSSHAPE value to Python's eval function without adequate sanitization or restriction of allowed expressions. This design choice assumes that input data sources are inherently trustworthy, a assumption that fails in scenarios where users process files obtained from external repositories, collaborative projects, or untrusted third parties. By embedding executable Python code within the metadata field intended for geometric parameters, an attacker can bypass standard type checking and trigger arbitrary script execution during the file loading phase via Map.read().

From a technical perspective, this vulnerability exploits the dynamic evaluation capabilities of Python to achieve remote code execution with the privileges of the user running the Gammapy application. The WCSSHAPE header card is typically used to define shape parameters for astronomical images, such as pixel dimensions or coordinate system boundaries. However, because the parsing logic does not validate that the content conforms strictly to expected numeric or geometric formats, it allows string interpolation and code execution. When a crafted .fits file containing a malicious Python expression in this field is processed by Map.read(), the eval function interprets the string as executable code rather than static data. This mechanism effectively turns standard astronomical data files into vectors for command injection, allowing attackers to execute system commands, exfiltrate sensitive information present in the user's environment, or establish persistent backdoors depending on the complexity of the injected payload and the security context of the host machine.

The operational impact of this vulnerability is severe, particularly within research institutions and observatories where Gammapy is widely used for analyzing gamma-ray data from telescopes like Fermi-LAT or Cherenkov Telescope Array. Researchers often download datasets from public archives such as HEASARC or collaborate with international teams sharing raw observational data. If a malicious actor distributes a compromised dataset containing the crafted WCSSHAPE field, any scientist loading this file into their analysis pipeline will inadvertently execute arbitrary code on their local workstation or cluster node. This can lead to complete compromise of the user's account, theft of proprietary research data, disruption of computational resources through resource exhaustion attacks, or lateral movement within institutional networks if the compromised machine has access to other sensitive systems. The risk is amplified by the fact that many users run these analysis scripts with elevated privileges to access hardware interfaces or large storage arrays.

This vulnerability aligns closely with CWE-94 Improper Control of Generation of Code (Code Injection), as it involves the construction and execution of code from untrusted input without proper validation. It also maps to MITRE ATT&CK technique T1059 Command and Scripting Interpreter, specifically sub-technique 006 Python, which describes adversaries using scripting languages like Python to execute commands on compromised systems. Furthermore, it relates to CWE-20 Improper Input Validation because the application fails to verify that the WCSSHAPE content matches the expected geometric data structure before processing. The attack vector is classified as local or network-based depending on how the file was obtained, but typically involves social engineering or supply chain compromise where a user is tricked into opening a maliciously crafted FITS file.

Mitigation strategies must focus on immediate patching and defensive coding practices until updates are deployed by the maintainers. Users should upgrade to Gammapy version 2.1.1 or later, where this issue has been addressed by replacing unsafe eval calls with safer parsing methods that strictly validate input formats against expected geometric schemas. In environments where upgrading is not immediately feasible, administrators should implement strict file integrity monitoring and restrict the execution of scripts from untrusted directories. Additionally, adopting a principle of least privilege for user accounts running analysis software can limit the blast radius if an exploit occurs. Security teams should also educate researchers on the risks associated with opening data files from unknown sources and encourage the use of sandboxed environments or virtual machines for processing potentially unverified datasets to isolate any potential code execution attempts from critical infrastructure.

Responsible

VulnCheck

Reservation

11/22/2026

Disclosure

11/22/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Do you know our Splunk app?

Download it now for free!