GHSA-v33j-v3x4-42qg: Hurl Regex Literal Vulnerability

MODERATE
Published
Advisory Summary

GHSA-v33j-v3x4-42qg is a MODERATE regex literal vulnerability (General Security Weakness) affecting Hurl libraries in the crates.io ecosystem. The issue involves regex literal in hurl files are not escaped when exported to html, allowing injections. Remediation is available by upgrading affected packages to version 7.0.0.

GHSA-v33j-v3x4-42qg at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-v33j-v3x4-42qg
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product Hurl
Package Ecosystem crates.io
Published Date
Last Updated

How to Fix GHSA-v33j-v3x4-42qg

To remediate this vulnerability, upgrade all affected Hurl dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

hurl fixed: 7.0.0
Upgrade hurl to 7.0.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for hurl

How to Check if You Are Affected

To determine whether your application is affected by GHSA-v33j-v3x4-42qg, inspect your project dependencies for Hurl:

inspect dependencies for hurl

Analyze the terminal output to locate any version of Hurl in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 7.0.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under General Security Weakness. In Hurl, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Given this Hurl file: regex.hurl: ``` GET https://foo.com HTTP 200 [Asserts] jsonpath "$.body" matches /<img src="" onerror="alert('Hi!')">/ ``` When exported to HTML: ``` $ hurlfmt --out html regex.hurl <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> </span><span class="response"><span class="line"><span class="version">HTTP</span> <span class="number">200</span></span> <span class="line"><span class="section-header">[Asserts]</span></span> <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> </span></span><span class="line"></span> </code></pre> ``` The regex literal `/<img src="" onerror="alert('Hi!')">/` is not escaped: `<span class="regex">/<img src="" onerror="alert('Hi!')">/</span></span>` When opened in a browser, the code is run without user interaction: ![regex](https://github.com/user-attachments/assets/9c20a2ff-900f-4420-b38b-1e7648749119)

GHSA-v33j-v3x4-42qg Affected Hurl Versions

1 component(s)
Fixed Versions:
7.0.0
Product / Package Ecosystem Affected Versions Fixed Version
hurl
crates.io
< 7.0.0
7.0.0

References

Frequently Asked Questions

What is GHSA-v33j-v3x4-42qg?
GHSA-v33j-v3x4-42qg is a security vulnerability in Hurl involving Regex literal in Hurl files are not escaped when exported to HTML, allowing injections under General Security Weakness.
Which Hurl versions are affected?
Affected versions include releases prior to 7.0.0 across affected packages: hurl.
What version fixes GHSA-v33j-v3x4-42qg?
Upgrading to 7.0.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is hurl affected?
Yes, hurl is affected in releases prior to 7.0.0. Upgrade your dependency to 7.0.0 or later.
What CWE is associated with GHSA-v33j-v3x4-42qg?
GHSA-v33j-v3x4-42qg is classified under General Security Weakness.
How can I check crates.io dependencies for GHSA-v33j-v3x4-42qg?
Run the dependency tree command: 'inspect dependencies for hurl'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-v33j-v3x4-42qg",
  "modified" : "2025-06-11T14:46:37Z",
  "published" : "2025-06-11T14:46:37Z",
  "aliases" : [ ],
  "summary" : "Regex literal in Hurl files are not escaped when exported to HTML, allowing injections",
  "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)",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "hurl"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "7.0.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 6.1.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Orange-OpenSource/hurl/security/advisories/GHSA-v33j-v3x4-42qg"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Orange-OpenSource/hurl/commit/248ac41cfa1797c52241c6ef756490d90027cdf2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Orange-OpenSource/hurl/commit/7dcdbd1796785392b1e829d1f07c6687b9a8f27d"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Orange-OpenSource/hurl"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-06-11T14:46:37Z",
    "nvd_published_at" : null
  }
}