A destination such as 1.2.3.4; id runs id as the login user (and with $(...) anything else). ping is a public NAPALM method, so any caller passing a hostname it did not validate is exposed.
Reachability today
netOrk only calls it through the ping sweep (netork/jobs/tasks/lan_scan/task.py:357 → PingSweepMixin._ping_once), and the sweep's targets are expanded with ipaddress.ip_network first (netork/jobs/tasks/lan_scan/_sweep.py:77), so netOrk passes plain IP addresses only. Not exploitable through netOrk as of origin/main; a hardening fix in a library method.
Expected
destination and source are passed through shlex.quote (or rejected unless they are an address/hostname); count, timeout, size, ttl coerced to int. Test-first: ping("1.2.3.4; id") sends ping … '1.2.3.4; id'.
(The same unquoted pattern is listed for napalm-openwrt in NAPALM/napalm-openwrt#13 and napalm-proxmox in NAPALM/napalm-proxmox#24.)
Priority: P3 — shell injection in a public driver method; not reachable from netOrk's own input today.
Found during the bug sweep of 2026-11-01.
## What happens
`ping()` (`napalm_linux/linux.py:1122-1123`) builds a shell line from its arguments and sends it to the interactive shell:
```python
src_opt = f"-I {source}" if source else ""
cmd = f"ping -c {count} -W {timeout} -s {size} -t {ttl} {src_opt} {destination} 2>&1"
```
A `destination` such as `1.2.3.4; id` runs `id` as the login user (and with `$(...)` anything else). `ping` is a public NAPALM method, so any caller passing a hostname it did not validate is exposed.
## Reachability today
netOrk only calls it through the ping sweep (`netork/jobs/tasks/lan_scan/task.py:357` → `PingSweepMixin._ping_once`), and the sweep's targets are expanded with `ipaddress.ip_network` first (`netork/jobs/tasks/lan_scan/_sweep.py:77`), so netOrk passes plain IP addresses only. Not exploitable through netOrk as of origin/main; a hardening fix in a library method.
## Expected
`destination` and `source` are passed through `shlex.quote` (or rejected unless they are an address/hostname); `count`, `timeout`, `size`, `ttl` coerced to `int`. Test-first: `ping("1.2.3.4; id")` sends `ping … '1.2.3.4; id'`.
(The same unquoted pattern is listed for napalm-openwrt in NAPALM/napalm-openwrt#13 and napalm-proxmox in NAPALM/napalm-proxmox#24.)
Priority: P3 — shell injection in a public driver method; not reachable from netOrk's own input today.
Found during the bug sweep of 2026-11-01.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What happens
ping()(napalm_linux/linux.py:1122-1123) builds a shell line from its arguments and sends it to the interactive shell:A
destinationsuch as1.2.3.4; idrunsidas the login user (and with$(...)anything else).pingis a public NAPALM method, so any caller passing a hostname it did not validate is exposed.Reachability today
netOrk only calls it through the ping sweep (
netork/jobs/tasks/lan_scan/task.py:357→PingSweepMixin._ping_once), and the sweep's targets are expanded withipaddress.ip_networkfirst (netork/jobs/tasks/lan_scan/_sweep.py:77), so netOrk passes plain IP addresses only. Not exploitable through netOrk as of origin/main; a hardening fix in a library method.Expected
destinationandsourceare passed throughshlex.quote(or rejected unless they are an address/hostname);count,timeout,size,ttlcoerced toint. Test-first:ping("1.2.3.4; id")sendsping … '1.2.3.4; id'.(The same unquoted pattern is listed for napalm-openwrt in NAPALM/napalm-openwrt#13 and napalm-proxmox in NAPALM/napalm-proxmox#24.)
Priority: P3 — shell injection in a public driver method; not reachable from netOrk's own input today.
Found during the bug sweep of 2026-11-01.