Summary
A code injection vulnerability in aeon's load_time_series_segmentation_benchmark method allows a user-supplied string to be executed as Python code without adequate validation. Exploitation may enable arbitrary code execution in the context of the current process when a target visits a malicious page or opens a malicious file.
Affected context
The vulnerability occurs in installations of aeon that use the load_time_series_segmentation_benchmark method to process user-influenced input. Risk depends on a vulnerable execution path being reached and on the target interacting with attacker-controlled content, such as a malicious page or file.
Exploit preconditions
- Attack surface: The aeon time-series segmentation benchmark loading functionality
- Required access: Ability to provide or influence the string processed by the vulnerable method
- User interaction: The target must visit a malicious page or open a malicious file
- Trigger point: Processing the attacker-influenced string by
load_time_series_segmentation_benchmark - Why exploitation is possible: The string is used in a Python code execution path without sufficient validation or isolation
Why this happens
The underlying flaw is the treatment of a user-supplied string as executable Python code rather than as inert data. Because validation and trust-boundary controls are insufficient before execution, attacker-controlled content can alter program behavior and execute in the current process context. This behavior maps to CWE-94: Improper Control of Generation of Code, commonly known as code injection.
Potential impact
- An attacker may execute arbitrary code in the affected process
- The application may disclose, modify, or delete accessible data
- A compromised process could be used to access connected services or resources
- The host environment could be affected according to the process's permissions
General mitigation guidance
Mitigation generally focuses on ensuring that input is handled strictly as data and never interpreted as executable Python code.
Common defensive patterns include:
- Replacing dynamic evaluation or code-generation behavior with explicit parsing and data-oriented APIs
- Applying allowlisted schemas, types, and values before processing benchmark inputs
- Treating files and content received from external sources as untrusted by default
- Separating parsing from execution and avoiding implicit evaluation during loading
- Running the affected process with least privilege and limiting access to sensitive resources
- Using isolation boundaries where processing untrusted content is necessary
How teams detect issues like this
Organizations can look for code injection risks through:
- Static analysis rules targeting
eval,exec, dynamic compilation, reflective execution, and equivalent APIs - Code review signals showing user-controlled strings flowing into interpreters or code-generation functions
- Data-flow analysis across file, web, and deserialization inputs into benchmark-loading routines
- Runtime monitoring for unexpected child processes, filesystem changes, or outbound connections
- Policy enforcement that blocks dynamic code execution in components intended only to parse data
Automated security review tools may help identify suspicious input-to-execution flows, but findings should be validated against the application's trust boundaries.

