Impact
The file sink renders a templated path from event fields and opens the resulting
path directly, creating parent directories as needed, without confining writes to a
base directory or rejecting absolute paths or .. traversal. When the path template
references event fields supplied by an untrusted source (for example, JSON received by
an http_server source), a remote attacker can set those fields to values such as
../../… and cause Vector to create or overwrite files outside the intended directory,
with the privileges of the Vector process. Depending on deployment this can escalate to
code execution — for example by writing into cron.d, an authorized_keys file, or a
script that is later executed.
Patches
This is resolved in version 0.57.0 and later of Vector.
Workarounds
If you cannot upgrade immediately:
- Do not use untrusted event fields in the
file sink path template; use a static
path, or template only on trusted fields.
Credit
This vulnerability was responsibly disclosed by Intercontinental Exchange, Inc. (ICE), Information Security, DeMarcus Campbell.
Impact
The
filesink renders a templatedpathfrom event fields and opens the resultingpath directly, creating parent directories as needed, without confining writes to a
base directory or rejecting absolute paths or
..traversal. When the path templatereferences event fields supplied by an untrusted source (for example, JSON received by
an
http_serversource), a remote attacker can set those fields to values such as../../…and cause Vector to create or overwrite files outside the intended directory,with the privileges of the Vector process. Depending on deployment this can escalate to
code execution — for example by writing into
cron.d, anauthorized_keysfile, or ascript that is later executed.
Patches
This is resolved in version 0.57.0 and later of Vector.
Workarounds
If you cannot upgrade immediately:
filesinkpathtemplate; use a staticpath, or template only on trusted fields.
Credit
This vulnerability was responsibly disclosed by Intercontinental Exchange, Inc. (ICE), Information Security, DeMarcus Campbell.