yt-dlp is a youtube-dl fork with additional features and fixes. yt-dlp allows the user to provide shell command lines to be executed at various stages in its download steps through the --exec flag. This flag allows output template expansion in its argument, so that metadata values may be used in the shell commands. The metadata fields can be combined with the %q conversion, which is intended to quote/escape these values so they can be safely passed to the shell. However, the escaping used for cmd (the shell used by Python's subprocess on Windows) does not properly escape special characters, which can allow for remote code execution if --exec is used directly with maliciously crafted remote data. This vulnerability only impacts yt-dlp on Windows, and the vulnerability is present regardless of whether yt-dlp is run from cmd or from PowerShell. Support for output template expansion in --exec, along with this vulnerable behavior, was added to yt-dlp in version 2021.04.11. yt-dlp version 2023.09.24 fixes this issue by properly escaping each special character. \n will be replaced by \r as no way of escaping it has been found. It is recommended to upgrade yt-dlp to version 2023.09.24 as soon as possible. Also, always be careful when using --exec, because while this specific vulnerability has been patched, using unvalidated input in shell commands is inherently dangerous. For Windows users who are not able to upgrade: 1. Avoid using any output template expansion in --exec other than {} (filepath). 2. If expansion in --exec is needed, verify the fields you are using do not contain ", | or &. 3. Instead of using --exec, write the info json and load the fields from it instead.
CVE-2023-40581
“—” beside the score: it is equal to NVD's CVSS score.
This high-severity CVE scores 8.3 under NVD CVSS v3. EPSS exploit probability: 1.3% (71st percentile of EPSS-scored CVEs). No GitHub Security Advisory CVSS is on record for this CVE.
- High severity, but no confirmed exploitation yet
A fix is available — apply it.
- CVSS v3
- 8.3
- EG Score
- 8.3HIGHmedium confidence
- EG Risk
- 38EG Risk 38/100
EG Risk is EchelonGraph's 0–100 priority score. It fuses impact severity (EG Severity, the CVSS base score, never the KEV-floored or EPSS-lifted EG Score) with real-world exploitation and automatability, under weights EchelonGraph set by hand, so you can rank equal-severity CVEs and fix the most dangerous first. Higher = act sooner.
How it’s computed (value × EchelonGraph’s weight)Severity83% × 45%Impact severity (EG Severity): CVSS 8.3 of 10. Never the KEV-floored or EPSS-lifted EG Score.Exploitation1.3% × 40%FIRST EPSS: the 30-day exploitation probability when EchelonGraph scored this CVE.Automatability0% × 15%CISA's SSVC Automatable value: no (Vulnrichment).SSVC (CISA's decision table, applied by EchelonGraph): Track at low or medium mission impact; Track* at high (mission-essential systems).Exploitation none (CISA Vulnrichment) · Automatable no (CISA Vulnrichment) · Technical impact total (CISA Vulnrichment). All three are CISA's SSVC values (Vulnrichment). EchelonGraph applied CISA's decision table to them; CISA publishes SSVC inputs and the table, not a decision for each CVE.Action: A fix is available. Apply it within your standard update timelines. - EPSS PROB
- 1.3%
- EPSS %ILE
- 71st
- KEV
- Not listed
What the EG score is made of (scorer v4.0: the three questions the 0–10 score mixes, published apart · methodology)
The EG score (8.3): severity, escalated by confirmed exploitation. This CVE's 8.3 is its impact severity (EG Severity), not escalated.
- EG Severity
- 8.3 HIGHCVSS-B, impact only: no KEV listing, EPSS or EG-KEV tier raises it.NVD CVSS v3 · CVSS v3.0 or v3.1
- EG Likelihood
- 1.3% within 30 daysSource: FIRST EPSS (model v2026.06.15, score date 2026-10-20). FIRST's exploitation probability, not an EchelonGraph model.
- Confirmed exploitation
- None on record (CISA KEV, EG-KEV Tier 1)Reported apart from the likelihood: an observed fact, not a probability.
- EG Priority
- SSVC Track at medium mission impactTrack at low or medium mission impact; Track* at high (mission-essential systems).CISA BOD 26-04: 14 days if the affected system is publicly exposed; Fix on system upgrade if it is not.Each input and its source: the SSVC and BOD 26-04 blocks below.
SSVC (CISA's decision table, applied by EchelonGraph)Track at low or medium mission impact; Track* at high (mission-essential systems).
A fix is available. Apply it within your standard update timelines.
Exploitation none (CISA Vulnrichment) · Automatable no (CISA Vulnrichment) · Technical impact total (CISA Vulnrichment). All three are CISA's SSVC values (Vulnrichment). EchelonGraph applied CISA's decision table to them; CISA publishes SSVC inputs and the table, not a decision for each CVE. Mission impact is CISA's Mission & Well-being decision point, and only you can judge it. CISA's table makes it high when Mission Prevalence is Essential — the vulnerable component "directly provides capabilities that constitute at least one MEF for at least one entity" (MEF: mission essential function) — or when Public Well-Being Impact is Irreversible: "multiple fatalities are likely", the cyber-physical system "is likely lost or destroyed", "extreme or serious externalities" are imposed on other parties, or social systems such as elections or the financial grid "are destabilized and potentially collapse". CISA's decision table
BOD 26-04 (CISA's remediation timeline, Table 1)14 days if the affected system is publicly exposed; Fix on system upgrade if it is not.
In CISA KEV no (CISA's KEV catalog) · Automatable no (CISA Vulnrichment) · Technical impact total (CISA Vulnrichment). Whether your system is publicly exposed is yours to answer. BOD 26-04 binds US Federal Civilian Executive Branch agencies; for anyone else it is CISA's published timeline, a reference rather than an obligation. The directive · how EchelonGraph applies it
Published
September 25, 2023
Last Modified
November 21, 2024
Advisory Details (5)
Auto-updated Sep 6, 2026`--exec` command injection when using `%q` in yt-dlp on Windows · Advisory · yt-dlp/yt-dlp · GitHub
https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-42h4-v29r-42qgyt-dlp 2023.09.24
Patch available: yt-dlp/yt-dlp 2023.09.24
https://github.com/yt-dlp/yt-dlp/releases/tag/2023.09.24yt-dlp 2021.04.11
Patch available: yt-dlp/yt-dlp 2021.04.11
https://github.com/yt-dlp/yt-dlp/releases/tag/2021.04.11commit de015e930747 (yt-dlp/yt-dlp)
Fix landed in yt-dlp/yt-dlp commit de015e930747 — awaiting tagged release
https://github.com/yt-dlp/yt-dlp/commit/de015e930747165dbb8fcd360f8775fd973b7d6eyt-dlp nightly 2023.09.24.003044
Patch available: yt-dlp/yt-dlp-nightly-builds 2023.09.24.003044
https://github.com/yt-dlp/yt-dlp-nightly-builds/releases/tag/2023.09.24.003044Affected Packages
(1 across 1 ecosystem)
PyPI(1)
| Package | Vulnerable range | Fix by version range | Dependents |
|---|---|---|---|
| yt-dlp | 2021.10.10 ... 2023.7.6 (51 versions) |
| — |
Weakness Classification(1)
MITRE Common Weakness Enumeration — the root-cause categories this CVE belongs to.
Data Freshness Timeline
(refreshed 9× in last 7d / 34× in last 30d)
Each row is a time one of our pipelines fetched, updated or re-scored this CVE. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. An arrow marks a change the record states ("CVSS v3 → 9.1"); EPSS and GHSA rows show the values recorded at that time, not what changed (EPSS values are rounded; hover one for the exact figures). Most recent first.
Showing the most recent 84 of 197 refreshes on record for this CVE.
A repeat, a row identical to one the same pipeline wrote less than 10 seconds earlier, is not a separate refresh and is not counted. 16 repeat rows among the latest 100 are merged into the row they repeat. The 113 oldest rows on record are not shown and were not checked, so the counts can still include repeats.
- 2026-10-22 16:31 UTCEPSS rescoreEPSS 1.3% · 71st percentile
- 2026-10-21 16:29 UTCEPSS rescoreEPSS 1.3% · 71st percentile
- 2026-10-20 23:19 UTCEG score recompute
- 2026-10-20 16:30 UTCEPSS rescoreEPSS 1.3% · 70th percentile
- 2026-10-19 16:29 UTCEPSS rescoreEPSS 1.3% · 70th percentile
- 2026-10-18 16:29 UTCEPSS rescoreEPSS 1.3% · 70th percentile
- 2026-10-18 07:53 UTCEG score recompute
- 2026-10-17 16:30 UTCEPSS rescoreEPSS 1.3% · 70th percentile
- 2026-10-16 16:36 UTCEPSS rescoreEPSS 1.3% · 70th percentile
- 2026-10-15 16:29 UTCEPSS rescoreEPSS 1.3% · 70th percentile
- 2026-10-14 16:30 UTCEPSS rescoreEPSS 1.3% · 70th percentile
- 2026-10-13 16:30 UTCEPSS rescoreEPSS 1.3% · 70th percentile
- 2026-10-13 01:24 UTCOSV refresh
- 2026-10-12 18:21 UTCEG score recompute
- 2026-10-12 16:31 UTCEPSS rescoreEPSS 1.3% · 70th percentile
- 2026-10-11 21:47 UTCEG score recompute
- 2026-10-11 13:45 UTCEPSS rescoreEPSS 1.3% · 70th percentile
- 2026-10-10 19:57 UTCEPSS rescoreEPSS 1.3% · 70th percentile
- 2026-10-09 20:05 UTCEPSS rescoreEPSS 1.3% · 70th percentile
- 2026-10-08 17:06 UTCEPSS rescoreEPSS 1.3% · 70th percentile
- 2026-10-07 23:46 UTCEPSS rescoreEPSS 1.3% · 70th percentile
- 2026-10-06 15:15 UTCEPSS rescoreEPSS 1.3% · 70th percentile
- 2026-10-05 17:41 UTCEPSS rescoreEPSS 1.3% · 70th percentile
- 2026-10-03 14:23 UTCEPSS rescoreEPSS 1.3% · 70th percentile
- 2026-10-01 19:48 UTCEPSS rescoreEPSS 1.3% · 70th percentile
Show 59 moreShow fewer
- 2026-09-30 16:29 UTCEG score recompute
- 2026-09-30 15:01 UTCEPSS rescoreEPSS 1.3% · 70th percentile
- 2026-09-29 15:17 UTCEPSS rescoreEPSS 1.3% · 70th percentile
- 2026-09-28 13:49 UTCEPSS rescoreEPSS 1.3% · 70th percentile
- 2026-09-27 13:42 UTCEPSS rescoreEPSS 1.3% · 70th percentile
- 2026-09-26 15:56 UTCEPSS rescoreEPSS 1.3% · 70th percentile
- 2026-09-26 00:22 UTCEPSS rescoreEPSS 1.3% · 70th percentile
- 2026-09-24 14:01 UTCEPSS rescoreEPSS 1.3% · 68th percentile
- 2026-09-23 13:46 UTCEPSS rescoreEPSS 1.3% · 69th percentile
- 2026-09-22 23:32 UTCOSV refresh
- 2026-09-20 20:14 UTCEPSS rescoreEPSS 1.3% · 68th percentile
- 2026-09-18 19:25 UTCEPSS rescoreEPSS 1.3% · 68th percentile
- 2026-09-17 19:25 UTCEPSS rescoreEPSS 1.3% · 68th percentile
- 2026-09-16 14:06 UTCEPSS rescoreEPSS 1.3% · 68th percentile
- 2026-09-16 05:11 UTCEPSS rescoreEPSS 1.3% · 68th percentile
- 2026-09-13 16:44 UTCEPSS rescoreEPSS 1.3% · 68th percentile
- 2026-09-12 14:58 UTCEPSS rescoreEPSS 1.3% · 68th percentile
- 2026-09-11 14:50 UTCEPSS rescoreEPSS 1.3% · 68th percentile
- 2026-09-11 09:34 UTCEPSS rescoreEPSS 1.3% · 68th percentile
- 2026-09-08 21:58 UTCEPSS rescoreEPSS 1.3% · 68th percentile
- 2026-09-07 15:59 UTCEPSS rescoreEPSS 1.3% · 68th percentile
- 2026-09-06 13:45 UTCEPSS rescoreEPSS 1.3% · 68th percentile
- 2026-09-05 15:26 UTCEPSS rescoreEPSS 1.3% · 67th percentile
- 2026-09-04 13:58 UTCEPSS rescoreEPSS 1.3% · 68th percentile
- 2026-09-04 05:04 UTCEPSS rescoreEPSS 1.3% · 68th percentile
- 2026-09-03 18:16 UTCOSV refresh
- 2026-09-02 14:09 UTCEPSS rescoreEPSS 1.3% · 68th percentile
- 2026-09-01 13:51 UTCEPSS rescoreEPSS 1.3% · 68th percentile
- 2026-08-30 19:15 UTCEPSS rescoreEPSS 1.3% · 68th percentile
- 2026-08-30 01:20 UTCEPSS rescoreEPSS 1.3% · 67th percentile
- 2026-08-28 21:39 UTCEPSS rescoreEPSS 1.3% · 67th percentile
- 2026-08-27 14:23 UTCEPSS rescoreEPSS 1.3% · 68th percentile
- 2026-08-26 14:43 UTCEPSS rescoreEPSS 1.3% · 68th percentile
- 2026-08-25 13:46 UTCEPSS rescoreEPSS 1.3% · 68th percentile
- 2026-08-23 00:17 UTCEPSS rescoreEPSS 1.3% · 68th percentile
- 2026-08-21 23:47 UTCEPSS rescoreEPSS 1.3% · 68th percentile
- 2026-08-20 22:53 UTCEPSS rescoreEPSS 1.3% · 68th percentile
- 2026-08-19 17:02 UTCEPSS rescoreEPSS 1.3% · 67th percentile
- 2026-08-18 13:46 UTCEPSS rescoreEPSS 1.3% · 67th percentile
- 2026-08-17 13:45 UTCEPSS rescoreEPSS 1.3% · 67th percentile
- 2026-08-17 07:31 UTCOSV refresh
- 2026-08-16 14:54 UTCEPSS rescoreEPSS 1.3% · 67th percentile
- 2026-08-16 02:12 UTCEPSS rescoreEPSS 1.3% · 67th percentile
- 2026-08-15 01:28 UTCEPSS rescoreEPSS 1.3% · 67th percentile
- 2026-08-13 21:58 UTCEPSS rescoreEPSS 1.3% · 67th percentile
- 2026-08-12 13:48 UTCEPSS rescoreEPSS 1.3% · 67th percentile
- 2026-08-11 13:39 UTCEPSS rescoreEPSS 1.3% · 67th percentile
- 2026-08-09 13:44 UTCEPSS rescoreEPSS 1.3% · 67th percentile
- 2026-08-08 16:35 UTCEPSS rescoreEPSS 1.3% · 67th percentile
- 2026-08-07 16:25 UTCEPSS rescoreEPSS 1.3% · 67th percentile
- 2026-08-06 13:45 UTCEPSS rescoreEPSS 1.3% · 67th percentile
- 2026-08-05 19:15 UTCEPSS rescoreEPSS 1.3% · 67th percentile
- 2026-08-04 15:07 UTCEPSS rescoreEPSS 1.3% · 67th percentile
- 2026-08-03 10:34 UTCEPSS rescoreEPSS 1.3% · 67th percentile
- 2026-08-02 02:25 UTCEPSS rescoreEPSS 1.3% · 67th percentile
- 2026-08-02 02:06 UTCOSV refresh
- 2026-08-01 04:13 UTCEPSS rescoreEPSS 1.3% · 67th percentile
- 2026-07-30 16:26 UTCEPSS rescoreEPSS 1.3% · 67th percentile
- 2026-07-30 01:28 UTCEPSS rescoreEPSS 1.3% · 67th percentile
Related CVEs(same product + same CWE)
Same product
9 shownPyPI:yt-dlp
Frequently asked(5)
What is CVE-2023-40581?
When was the CVE record for CVE-2023-40581 published?
Is CVE-2023-40581 actively exploited?
What is the CVSS score of CVE-2023-40581?
How do I remediate CVE-2023-40581?
Dependency Blast Radius
See which npm, PyPI, Go, and Maven packages are affected by CVE-2023-40581
Is Your Infrastructure Affected by CVE-2023-40581?
EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.