Skip to content

Commit 4088f0c

Browse files
1 parent 131b189 commit 4088f0c

2 files changed

Lines changed: 151 additions & 0 deletions

File tree

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-3jh3-prx3-w6wc",
4+
"modified": "2026-02-23T22:15:03Z",
5+
"published": "2026-02-23T22:15:03Z",
6+
"aliases": [
7+
"CVE-2026-27126"
8+
],
9+
"summary": "Craft CMS has Stored XSS in Table Field via \"HTML\" Column Type",
10+
"details": "A stored Cross-site Scripting (XSS) vulnerability exists in the `editableTable.twig` component when using the `html` column type. The application fails to sanitize the input, allowing an attacker to execute arbitrary JavaScript when another user views a page with the malicious table field.\n\n## Prerequisites\n* An administrator account\n* `allowAdminChanges` must be enabled in production, which is [against our security recommendations](https://craftcms.com/knowledge-base/securing-craft#set-allowAdminChanges-to-false-in-production).\n\n## Steps to Reproduce\n1. Navigate to **Settings** → **Fields** and create a new field with Type: **Table**\n1. Add a **Column Heading** and set **Column Type** to `Single-line text`\n - **Note:** The vulnerable **Column Type** is `html`, but it's not available in the UI dropdown.\n1. In **Default Values** section, add a row with the following payload:\n ```html\n <img src=x onerror=\"alert('XSS')\">\n ```\n1. Enable `Static Rows`\n1. Intercept the **Save Field** request using a proxy tool (e.g., Burp Suite) or use `cURL` directly\n1. Modify the request body and change the `types[craft-fields-Table][columns][col3][type]` parameter from `singleline` to `html`\n1. Forward the request to save the field\n1. Use the field in any object (e.g. user profile fields) → then visit the any user's profile\n1. Notice the XSS execution\n1. The XSS will also trigger when an administrator attempts to edit this field, as the malicious payload is executed within the field configuration page, too.\n\n## Resources\n\nhttps://github.com/craftcms/cms/commit/f5d488d9bb6eff7670ed2c2fe30e15692e92c52b",
11+
"severity": [
12+
{
13+
"type": "CVSS_V4",
14+
"score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:P/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "Packagist",
21+
"name": "craftcms/cms"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "4.5.0-RC1"
29+
},
30+
{
31+
"fixed": "4.16.19"
32+
}
33+
]
34+
}
35+
],
36+
"database_specific": {
37+
"last_known_affected_version_range": "<= 4.16.18"
38+
}
39+
},
40+
{
41+
"package": {
42+
"ecosystem": "Packagist",
43+
"name": "craftcms/cms"
44+
},
45+
"ranges": [
46+
{
47+
"type": "ECOSYSTEM",
48+
"events": [
49+
{
50+
"introduced": "5.0.0-RC1"
51+
},
52+
{
53+
"fixed": "5.8.23"
54+
}
55+
]
56+
}
57+
],
58+
"database_specific": {
59+
"last_known_affected_version_range": "<= 5.8.22"
60+
}
61+
}
62+
],
63+
"references": [
64+
{
65+
"type": "WEB",
66+
"url": "https://github.com/craftcms/cms/security/advisories/GHSA-3jh3-prx3-w6wc"
67+
},
68+
{
69+
"type": "WEB",
70+
"url": "https://github.com/craftcms/cms/commit/f5d488d9bb6eff7670ed2c2fe30e15692e92c52b"
71+
},
72+
{
73+
"type": "PACKAGE",
74+
"url": "https://github.com/craftcms/cms"
75+
}
76+
],
77+
"database_specific": {
78+
"cwe_ids": [
79+
"CWE-79"
80+
],
81+
"severity": "MODERATE",
82+
"github_reviewed": true,
83+
"github_reviewed_at": "2026-02-23T22:15:03Z",
84+
"nvd_published_at": null
85+
}
86+
}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-g3gw-q23r-pgqm",
4+
"modified": "2026-02-23T22:13:58Z",
5+
"published": "2026-02-23T22:13:58Z",
6+
"aliases": [
7+
"CVE-2026-26331"
8+
],
9+
"summary": "yt-dlp: Arbitrary Command Injection when using the `--netrc-cmd` option",
10+
"details": "### Summary\nWhen yt-dlp's `--netrc-cmd` command-line option (or `netrc_cmd` Python API parameter) is used, an attacker could achieve arbitrary command injection on the user's system with a maliciously crafted URL.\n\n### Impact\nyt-dlp maintainers assume the impact of this vulnerability to be high for anyone who uses `--netrc-cmd` in their command/configuration or `netrc_cmd` in their Python scripts. Even though the maliciously crafted URL itself will look very suspicious to many users, it would be trivial for a maliciously crafted webpage with an inconspicuous URL to covertly exploit this vulnerability via HTTP redirect. Users without `--netrc-cmd` in their arguments or `netrc_cmd` in their scripts are unaffected. No evidence has been found of this exploit being used in the wild.\n\n### Patches\nyt-dlp version 2026.02.21 fixes this issue by validating all netrc \"machine\" values and raising an error upon unexpected input.\n\n### Workarounds\nIt is recommended to upgrade yt-dlp to version 2026.02.21 as soon as possible.\n\nUsers who are unable to upgrade should avoid using the `--netrc-cmd` command-line option (or `netrc_cmd` Python API parameter), or they should at least not pass a placeholder (`{}`) in their `--netrc-cmd` argument.\n\n### Details\nyt-dlp's `--netrc-cmd` option can be used to run any arbitrary shell command to retrieve site login credentials so that the user doesn't have to store the credentials as plaintext in the filesystem. The `--netrc-cmd` argument is a shell command with an optional placeholder (`{}`). If the placeholder is present in the argument, it is replaced with the netrc \"machine\" value, which specifies the site for which login credentials are needed.\n\nThe netrc \"machine\" value is usually explicitly defined in yt-dlp's extractor code for a given site. However, yt-dlp has four extractors where the netrc \"machine\" value needs to be dynamically sourced from the site's hostname. And in three of those extractors (`GetCourseRuIE`, `TeachableIE` and `TeachableCourseIE`), wildcard matches are allowed for one or more subdomains of the hostname. This can result in a netrc \"machine\" value that contains special shell characters.\n\nThe `--netrc-cmd` argument is executed by a modified version of Python's `subprocess.Popen` with `shell=True`, which means that any special characters may be interpreted by the host shell, potentially leading to arbitrary command injection.\n\nHere is an example of maliciously crafted URL input that exploits the vulnerability:\n\n```cmd\n> yt-dlp --netrc-cmd \"echo {}\" \"https://;echo pwned>&2;#.getcourse.ru/video\"\n[GetCourseRu] Executing command: echo getcourseru\nWARNING: [GetCourseRu] Failed to parse .netrc: bad toplevel token 'getcourseru' (-, line 2)\n[GetCourseRu] Extracting URL: https://;echo pwned>&2;#.getcourse.ru/video\n[GetCourseRu] Executing command: echo ;echo pwned>&2;\npwned\n[GetCourseRu] No authenticators for ;echo pwned>&2;\n[GetCourseRu] video: Downloading webpage\n```\n\nAlthough only 3 of yt-dlp's extractors are directly susceptible to this attack, yt-dlp's \"generic\" extractor will follow HTTP redirects and try to match the resulting URL with one of the dedicated extractors. This means that any URL processed by the generic extractor could ultimately lead to a maliciously crafted URL that is matched by one of the vulnerable extractors. Hypothetically, an attacker could create a website with an inconspicuous URL and legitimate-looking media content that would serve an HTTP redirect to a maliciously crafted URL when it detects a request from yt-dlp.\n\n\n### References\n- https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-g3gw-q23r-pgqm\n- https://nvd.nist.gov/vuln/detail/CVE-2026-26331\n- https://github.com/yt-dlp/yt-dlp/releases/tag/2026.02.21\n- https://github.com/yt-dlp/yt-dlp/commit/1fbbe29b99dc61375bf6d786f824d9fcf6ea9c1a",
11+
"severity": [
12+
{
13+
"type": "CVSS_V3",
14+
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "PyPI",
21+
"name": "yt-dlp"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "2023.06.21"
29+
},
30+
{
31+
"fixed": "2026.02.21"
32+
}
33+
]
34+
}
35+
]
36+
}
37+
],
38+
"references": [
39+
{
40+
"type": "WEB",
41+
"url": "https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-g3gw-q23r-pgqm"
42+
},
43+
{
44+
"type": "WEB",
45+
"url": "https://github.com/yt-dlp/yt-dlp/commit/1fbbe29b99dc61375bf6d786f824d9fcf6ea9c1a"
46+
},
47+
{
48+
"type": "PACKAGE",
49+
"url": "https://github.com/yt-dlp/yt-dlp"
50+
},
51+
{
52+
"type": "WEB",
53+
"url": "https://github.com/yt-dlp/yt-dlp/releases/tag/2026.02.21"
54+
}
55+
],
56+
"database_specific": {
57+
"cwe_ids": [
58+
"CWE-78"
59+
],
60+
"severity": "HIGH",
61+
"github_reviewed": true,
62+
"github_reviewed_at": "2026-02-23T22:13:58Z",
63+
"nvd_published_at": null
64+
}
65+
}

0 commit comments

Comments
 (0)