# CVE-2026-93371: marcopiovanello yt-dlp-web-ui generic.go NewGenericDownload command injection

The Markdown version of <https://upatch.dev/cve/CVE-2026-93371>. Last updated 25 Nov 2026.

## At a glance

CVE-2026-93371 is rated Medium 5.5 (CVSS 4.0, CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:L/SI:L/SA:L/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X). It affects yt-dlp-web-ui (marcopiovanello) and was published on 18 Sept 2026. It is not in CISA's Known Exploited Vulnerabilities catalog. Its EPSS score is 1.4%: the estimated chance it is exploited in the next 30 days, as of 24 Nov 2026. The upatch `cve-2026-93371-exec-block` mitigates it, and is vetted (merged into the registry).

A upatch is a signed BPF program that shirudo loads into a running Linux kernel to block the code path this CVE's exploit takes. It holds the line until the fix ships; it does not replace patching.

## The vulnerability

CVE-2026-93371, published on 18 September 2026, affects `marcopiovanello/yt-dlp-web-ui` up to v4 (`v4.0.0`) in `NewGenericDownload` and `GenericDownloader.Start` (`server/internal/downloaders/generic.go`). Prior to commit `c7ad3bd79c7c520a7d17e7f2ba19d962be8e7897`, `argsSanitizer` (`server/internal/downloaders/utils.go`) only stripped arguments matching `${` or `&&` and empty strings, allowing remote callers of the REST `/api/v1/exec` or JSON-RPC `/rpc` `Service.Exec` endpoints to inject arbitrary `yt-dlp` flags via `params` (such as `--exec`, `--paths`, `-P`, or `--load-info-json`) into the `exec.CommandContext` invocation of `yt-dlp`.

### Official description

A security vulnerability has been detected in marcopiovanello yt-dlp-web-ui up to v4. This issue affects the function NewGenericDownload of the file server/internal/downloaders/generic.go. Such manipulation of the argument params leads to command injection. It is possible to launch the attack remotely. The exploit has been disclosed publicly and may be used. The name of the patch is c7ad3bd79c7c520a7d17e7f2ba19d962be8e7897. A patch should be applied to remediate this issue.

## What the upatch does

A sleepable BPF LSM program on `lsm.s/bprm_check_security` checks whether the calling task's executable name or command name starts with `yt-dlp-web` (matching `yt-dlp-webui_linux-amd64` and `yt-dlp-web-ui`). For the initial binary execution (`bprm->interp == bprm->filename`), it returns `-EPERM` unless:

1. The target executable name starts with `yt-dlp` (and not `yt-dlp-web`).
2. Every dash-prefixed argument in `argv[1..argc-1]` read from the new process user stack (`mm->arg_start` to `mm->arg_end`) is in the allowlist of flags permitted by `yt-dlp-web-ui` (`baseParams`, `-o`, `--version`, `--dump-single-json`, `--simulate`, and `allowedFlags` from commit `c7ad3bd79c7c520a7d17e7f2ba19d962be8e7897`).

Interpreter passes (`bprm->interp != bprm->filename`, such as `/usr/bin/env` or `python3` when `yt-dlp` is a script) are permitted once the initial `yt-dlp` invocation and its `argv` have passed the check. Refusals are counted in the `refused` per-CPU array map at key 0.

The policy: [`cve-2026-93371-exec-block.bpf.c`](https://github.com/copper-helm/upatch-registry/tree/main/upatches/cve-2026-93371), 259 lines of BPF C attached at `lsm.s/bprm_check_security`, licensed GPL-2.0 OR BSD-2-Clause.

## Side effects

- Any download request to `yt-dlp-web-ui` that includes a flag outside the upstream `allowedFlags` allowlist (including `-P`, `--paths`, `--exec`, or `--cookies`) is refused at `execve` with `EPERM`.
- `yt-dlp-web-ui` cannot execute binaries whose name does not start with `yt-dlp`.
- Invocations of `yt-dlp` with more than 32 arguments or an individual argument of 512 bytes or more are refused.

## Preemption model and cost

The program uses a per-CPU array for refusal counting updated with `__sync_fetch_and_add` and a per-CPU scratch buffer while running on `lsm.s/bprm_check_security`. On all `execve` calls by processes other than `yt-dlp-web-ui`, the program checks the calling task's executable dentry name and `comm` and returns immediately without reading user memory.

## Affected versions

The upatch targets Linux kernels with BTF and BPF LSM support (tested on Linux 7.4). For `marcopiovanello/yt-dlp-web-ui`, versions up to `v4.0.0` are affected; commit `c7ad3bd79c7c520a7d17e7f2ba19d962be8e7897` fixes the issue by enforcing `allowedFlags` in `argsSanitizer`.

## How it was tested

On a vulnerable yt-dlp-web-ui v4.0.0, the loaded upatch refused executing yt-dlp with unallowlisted command-line flags injected via NewGenericDownload params, and execution succeeded again after unloading.

- **Tested:** 25 Nov 2026
- **Target:** marcopiovanello yt-dlp-web-ui v4.0.0 listening on 127.0.0.1:3033
- **Kernel:** 7.4-shirudo-ci-20261123
- **Architecture:** x86_64
- **Distribution:** Ubuntu 26.04

### Results

| State           | Unallowlisted yt-dlp flag executed via NewGenericDownload params |
| --------------- | ---------------------------------------------------------------- |
| Before loading  | reached                                                          |
| Upatch loaded   | blocked                                                          |
| After unloading | reached                                                          |

## How to apply

Build the upatch from source, sign it with your own shirudo key, and publish it to your own OCI registry. Machines that follow your upatch tree load it within about a minute.

Build and sign:

```sh
git clone https://github.com/copper-helm/upatch-registry
cd upatch-registry
tools/build <shirudo-checkout> <keys-dir> 1.0.0 upatches/cve-2026-93371
```

Publish and roll out:

```sh
shirudo bpm push build/packages/cve-2026-93371-1.0.0.bee oci://<registry>/<namespace>/cve-2026-93371 --keys-dir <keys-dir>
shirudo bpm tree append build/packages/cve-2026-93371-1.0.0.bee oci://<registry>/<namespace>/<tree> --tree-id <tree-id> --keys-dir <keys-dir>
```

## Review

- Contributors: romanlab.
- Reviewers: none recorded yet.

## Sources and links

- [CVE-2026-93371 record (CVE API)](https://cveawg.mitre.org/api/cve/CVE-2026-93371)
- [Fix commit c7ad3bd79c7c520a7d17e7f2ba19d962be8e7897](https://github.com/marcopiovanello/yt-dlp-web-ui/commit/c7ad3bd79c7c520a7d17e7f2ba19d962be8e7897)
- [marcopiovanello/yt-dlp-web-ui repository](https://github.com/marcopiovanello/yt-dlp-web-ui/)
- [yt-dlp-web-ui v4.0.0 release](https://github.com/marcopiovanello/yt-dlp-web-ui/releases/tag/v4.0.0)
- [VulDB entry 406851](https://vuldb.com/vuln/406851)

### Links

- [CVE-2026-93371 on upatch.dev](https://upatch.dev/cve/CVE-2026-93371) (this page, as HTML)
- [NVD](https://nvd.nist.gov/vuln/detail/CVE-2026-93371)
- [CVE.org](https://www.cve.org/CVERecord?id=CVE-2026-93371)
- [CWE-74](https://cwe.mitre.org/data/definitions/74.html)
- [CWE-77](https://cwe.mitre.org/data/definitions/77.html)
- Upatch source: [upatches/cve-2026-93371](https://github.com/copper-helm/upatch-registry/tree/main/upatches/cve-2026-93371)

### More references from NVD (6)

- [github.com](https://github.com/marcopiovanello/yt-dlp-web-ui/)
- [github.com](https://github.com/marcopiovanello/yt-dlp-web-ui/commit/c7ad3bd79c7c520a7d17e7f2ba19d962be8e7897)
- [vuldb.com](https://vuldb.com/cve/CVE-2026-93371)
- [vuldb.com](https://vuldb.com/submit/942846)
- [vuldb.com](https://vuldb.com/vuln/406851)
- [vuldb.com](https://vuldb.com/vuln/406851/cti)
