Summary
NOAA PMEL Live Access Server (LAS) is vulnerable to OS command injection when processing specially crafted requests that embed PyFerret expressions.
An unauthenticated remote attacker can abuse SPAWN-like functionality in these expressions to execute arbitrary operating system commands on the LAS host.
Affected context
This vulnerability affects deployments of NOAA PMEL Live Access Server that:
- Expose LAS functionality over HTTP/HTTPS to untrusted clients
- Enable PyFerret expression support in request processing
- Use the vulnerable implementation of
gov.noaa.pmel.tmap.las.filter.RequestInputFilter
Under these conditions, user-controlled request parameters can flow into PyFerret evaluation in a way that ultimately influences shell command construction on the server.
Exploit preconditions
- Attack surface: Network-accessible LAS endpoints that parse and evaluate PyFerret expressions from incoming requests.
- Required access: None; exploitation can be attempted by any remote, unauthenticated user able to send HTTP(S) requests to the LAS instance.
- Trigger point: Submission of a specially crafted request parameter or payload containing PyFerret expressions that invoke SPAWN-style commands.
- Why exploitation is possible: User-supplied data is interpreted as part of a PyFerret expression and passed to command execution primitives without adequate sanitization, escaping, or restriction, allowing arbitrary OS command construction.
Why this happens
The core issue is an OS command injection flaw in the request filtering and evaluation pipeline.
The vulnerable RequestInputFilter trusts portions of incoming requests that contain PyFerret expressions and allows those expressions to invoke SPAWN or equivalent features that delegate to the operating system shell. Because the data driving these expressions is not strictly validated or constrained, attackers can introduce tokens that modify the intended command or inject entirely new commands.
This maps directly to CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where application code builds or forwards commands to the OS using untrusted input instead of using safely parameterized, constrained, or disabled execution paths.
Potential impact
- Remote execution of arbitrary OS commands with the privileges of the LAS service account
- Full compromise of the affected LAS host, including data theft or modification
- Installation of backdoors or malware for persistent access
- Use of the server as a pivot point for lateral movement within the network
- Disruption or manipulation of scientific data services, including availability and integrity loss
General mitigation guidance
Mitigation typically focuses on removing or strictly constraining the ability of user input to reach OS command execution paths:
- Disable or restrict SPAWN or similar command-execution features in PyFerret when handling untrusted client input.
- Constrain the interpreter environment so that only a minimal, pre-defined set of safe operations can be invoked from user-supplied expressions.
- Apply robust input validation to PyFerret-related parameters, rejecting or stripping constructs that could lead to command execution.
- Avoid constructing shell commands from dynamic input; where OS interaction is required, prefer fixed command templates and safe APIs that do not invoke the shell.
- Run LAS under a dedicated, least-privileged account and with restrictive OS-level controls (e.g., filesystem permissions, outbound network limits, process isolation) to limit blast radius if exploitation occurs.
- Place LAS behind application gateways or proxies that can restrict or sanitize high-risk request patterns related to expression evaluation.
How teams detect issues like this
Effective detection usually combines code-centric and operational approaches:
- Static analysis: Scan the LAS codebase and related filters for any use of shell invocation APIs (e.g., Java
Runtime.exec,ProcessBuilder) that derive arguments from request parameters, especially around PyFerret expression handling and SPAWN-like operations. - Code review: Examine
RequestInputFilterand associated expression parsing logic for direct or indirect flows of user input into command execution, paying attention to string concatenation, unescaped parameters, and broad interpreter features. - Runtime monitoring: Instrument LAS hosts to log command executions originating from the LAS process and alert on unexpected binaries, unusual arguments, or commands triggered by web traffic patterns.
- Web and API logging: Monitor HTTP(S) logs for suspicious PyFerret expressions, atypical symbols indicative of command injection, or repeated failed attempts targeting expression-related parameters.
- Policy and CI enforcement: Incorporate secure coding policies that prohibit unbounded interpreter features and shell calls with request-derived data, enforcing them through CI checks and automated code review tools.

