Summary
Flowsint's org_to_asn transformer allows arbitrary OS command execution by concatenating untrusted organization data into shell commands that run inside a Docker container.
A remote attacker who can create a sketch and trigger this transformer can execute commands as root on the host via shell metacharacters and container escape, leading to full system compromise.
Affected context
This vulnerability affects Flowsint deployments where:
- Users can remotely create investigations and sketches and add organization nodes.
- The
org_to_asntransformer is available and callable on organization nodes. - Transformer implementations construct and execute shell commands that include data derived from node content without strong validation or isolation.
It is especially risky in environments where the Flowsint service runs with elevated privileges or Docker is configured in a way that allows container escape to impact the host.
Exploit preconditions
- Attack surface: Flowsint web/API interface that allows managing sketches and triggering transformers.
- Required access: Ability to authenticate or otherwise reach functionality that creates sketches and invokes the
org_to_asntransform on an organization node. - Trigger point: Execution of the
org_to_asntransformer, which builds and runs a shell command incorporating organization data. - Why exploitation is possible: The transformer passes attacker-controlled values directly into a shell context (likely via
sh -cor similar), allowing shell metacharacters to break out of intended arguments. Because the command runs with root privileges in a container that can be escaped, successful injection leads to command execution on the host.
Why this happens
The core issue is an OS command injection pattern, as described in CWE-78: Improper Neutralization of Special Elements used in an OS Command.
The org_to_asn transformer constructs shell commands by concatenating or interpolating organization node data directly into command strings that are executed by the operating system. Shell metacharacters (such as ;, &&, |, backticks, or $() ) are not properly neutralized or avoided, so user-controlled input is interpreted as part of the command syntax rather than plain data.
This unsafe command construction is executed within a Docker container but with root privileges and a configuration that permits container escape, turning what might otherwise be a container-level compromise into a host-level code execution issue.
Potential impact
- Execution of arbitrary OS commands as root on the host machine.
- Full compromise of the Flowsint server, including modification or deletion of investigations and sketches.
- Theft or manipulation of any OSINT data stored or processed by Flowsint.
- Pivoting to other internal systems reachable from the compromised host.
- Installation of persistent malware or backdoors on the host and its containers.
- Destruction or ransomware-style encryption of host data.
General mitigation guidance
Effective mitigation focuses on removing unsafe shell usage patterns and tightening privilege boundaries:
- Replace shell-based command construction with library calls or APIs that do not invoke a shell (e.g., using native language libraries or system calls that accept argument arrays rather than command strings).
- If external commands are unavoidable, use process execution APIs that pass arguments as lists and never concatenate untrusted data into a single shell string.
- Strictly validate and sanitize all transformer input, applying allowlists for expected formats (for example, constrained organization names or IDs) and rejecting unexpected characters like shell metacharacters.
- Reduce privileges for the Flowsint service and its containers, following least-privilege principles and minimizing Docker capabilities so that a container breakout is significantly harder.
- Isolate the environment used by transformers, for instance by using constrained sandboxes, dedicated unprivileged containers, or separate worker processes with restricted access to the host.
- Treat transformer code as untrusted input-handling logic and subject it to regular security review, threat modeling, and hardening.
How teams detect issues like this
Detection can leverage both code-centric and operational techniques:
- Static analysis: Scan the codebase for direct use of shell-executing APIs (
system,popen,exec*,subprocesswithshell=True, or similar) where any part of the command originates from user-controllable sketch or node data. - Code review cues: Pay special attention to transformer implementations that:
- Build command strings with string concatenation or interpolation.
- Accept organization names, domains, or similar free-text fields and pass them to the OS.
- Run commands inside Docker with elevated privileges or access to the host Docker socket.
- Policy enforcement: Introduce development policies that:
- Forbid shell execution with untrusted inputs unless a strict justification and review are documented.
- Require security review for new transformer types and any code that interfaces with Docker or host-level resources.
- Runtime monitoring: Use host and container monitoring to:
- Detect unexpected shell invocations or commands launched by Flowsint processes.
- Alert on anomalous container behavior indicative of escape attempts (e.g., access to Docker socket, unusual mounting, or privileged operations).

