GHSA-3MR9-P497-58F6

Vulnerability from github – Published: 2026-08-06 19:43 – Updated: 2026-08-06 19:43
VLAI
Summary
Contao crawler leaks auth credentials to external hosts
Details

Summary

Contao's crawler tries to prevent confidential HTTP client options from being sent to external domains by creating a scoped client: full options for root page origins, cleaned options for everything else. The cleaner removes Cookie and Authorization headers, but it removes the non-Symfony option names basic_auth and bearer_auth instead of Symfony HttpClient's real auth_basic and auth_bearer options.

When contao.crawl.default_http_client_options contains Basic or Bearer authentication for a protected staging/production site, those credentials remain in the "clean" client used for external links or configured additional URIs. An attacker who can get an external URL crawled, for example through a link on a crawled page while the broken-link checker is enabled, can receive the crawler credentials.

Technical Detail

Root Cause

// core-bundle/src/Crawl/Escargot/Factory.php:175-209 @ e550b92a01ef625bd546e6c3956dd200af05ebf0
private function createHttpClient(array $options = []): HttpClientInterface
{
    $options = array_merge_recursive(
        [
            'headers' => [
                'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
                'user-agent' => self::USER_AGENT,
            ],
            'max_duration' => 10,
        ],
        array_merge_recursive($this->getDefaultHttpClientOptions(), $options),
    );

    $cleanOptions = $this->cleanOptionsFromConfidentialData($options);

    if ($options === $cleanOptions) {
        return ($this->httpClientFactory)($options);
    }

    $scopedOptionsByRegex = [];

    foreach ($this->getRootPageUriCollection()->all() as $rootPageUri) {
        $scopedOptionsByRegex[preg_quote($this->getOriginFromUri($rootPageUri))] = $options;
    }

    return new ScopingHttpClient(($this->httpClientFactory)($cleanOptions), $scopedOptionsByRegex);
}
// core-bundle/src/Crawl/Escargot/Factory.php:226-247 @ e550b92a01ef625bd546e6c3956dd200af05ebf0
foreach ($options as $k => $v) {
    if ('headers' === $k) {
        foreach ($v as $header => $value) {
            if (\in_array(strtolower($header), ['authorization', 'cookie'], true)) {
                continue;
            }

            $cleanOptions['headers'][$header] = $value;
        }

        continue;
    }

    if ('basic_auth' === $k || 'bearer_auth' === $k) {
        continue;
    }

    $cleanOptions[$k] = $v;
}

Symfony HttpClient authentication options are auth_basic and auth_bearer; Contao's own manual documents auth_basic for crawler Basic Authentication. Because the cleaner only strips basic_auth and bearer_auth, the "clean" default client for non-root-page hosts still carries the real auth options. The existing factory test intends to assert that Authorization is not sent to www.foreign-domain.com, but its mock client factory ignores the $defaultOptions argument, so it does not catch auth options that survive into HttpClient::create($cleanOptions).

Suggested Mitigation

Strip the actual Symfony HttpClient authentication option keys from the clean client. Include NTLM as a defensive extension because Symfony documents it as another auth option.

-            if ('basic_auth' === $k || 'bearer_auth' === $k) {
+            if (\in_array($k, ['auth_basic', 'auth_bearer', 'auth_ntlm', 'basic_auth', 'bearer_auth'], true)) {
                 continue;
             }

Also update the factory test so the mock factory records or preserves $defaultOptions; otherwise the test does not verify what HttpClient::create($cleanOptions) receives in production.

Impact

  • Direct primitive: disclosure of crawler Basic/Bearer credentials to an external host reached by the crawler.
  • Chain potential: if those credentials protect a staging or pre-publication environment, an attacker can use them to access that environment. The impact depends on what the leaked credential unlocks.
  • Realistic exploitation: a content editor adds a link to https://attacker.example/probe on a page that the crawler visits. When an administrator or scheduled maintenance run starts the broken-link checker with crawler Basic/Bearer authentication configured, the request to the attacker URL includes the generated Authorization header.
Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Packagist",
        "name": "contao/contao"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "4.13.0"
            },
            {
              "fixed": "5.3.47"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Packagist",
        "name": "contao/contao"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "5.4.0"
            },
            {
              "fixed": "5.7.7"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Packagist",
        "name": "contao/core-bundle"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "4.13.0"
            },
            {
              "fixed": "5.3.47"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Packagist",
        "name": "contao/core-bundle"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "5.4.0"
            },
            {
              "fixed": "5.7.7"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-55824"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-200"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-08-06T19:43:02Z",
    "nvd_published_at": "2026-07-31T19:17:11Z",
    "severity": "LOW"
  },
  "details": "### Summary\nContao\u0027s crawler tries to prevent confidential HTTP client options from being sent to external domains by creating a scoped client: full options for root page origins, cleaned options for everything else. The cleaner removes `Cookie` and `Authorization` headers, but it removes the non-Symfony option names `basic_auth` and `bearer_auth` instead of Symfony HttpClient\u0027s real `auth_basic` and `auth_bearer` options.\n\nWhen `contao.crawl.default_http_client_options` contains Basic or Bearer authentication for a protected staging/production site, those credentials remain in the \"clean\" client used for external links or configured additional URIs. An attacker who can get an external URL crawled, for example through a link on a crawled page while the broken-link checker is enabled, can receive the crawler credentials.\n\n## Technical Detail\n\n### Root Cause\n\n```php\n// core-bundle/src/Crawl/Escargot/Factory.php:175-209 @ e550b92a01ef625bd546e6c3956dd200af05ebf0\nprivate function createHttpClient(array $options = []): HttpClientInterface\n{\n    $options = array_merge_recursive(\n        [\n            \u0027headers\u0027 =\u003e [\n                \u0027accept\u0027 =\u003e \u0027text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\u0027,\n                \u0027user-agent\u0027 =\u003e self::USER_AGENT,\n            ],\n            \u0027max_duration\u0027 =\u003e 10,\n        ],\n        array_merge_recursive($this-\u003egetDefaultHttpClientOptions(), $options),\n    );\n\n    $cleanOptions = $this-\u003ecleanOptionsFromConfidentialData($options);\n\n    if ($options === $cleanOptions) {\n        return ($this-\u003ehttpClientFactory)($options);\n    }\n\n    $scopedOptionsByRegex = [];\n\n    foreach ($this-\u003egetRootPageUriCollection()-\u003eall() as $rootPageUri) {\n        $scopedOptionsByRegex[preg_quote($this-\u003egetOriginFromUri($rootPageUri))] = $options;\n    }\n\n    return new ScopingHttpClient(($this-\u003ehttpClientFactory)($cleanOptions), $scopedOptionsByRegex);\n}\n```\n\n```php\n// core-bundle/src/Crawl/Escargot/Factory.php:226-247 @ e550b92a01ef625bd546e6c3956dd200af05ebf0\nforeach ($options as $k =\u003e $v) {\n    if (\u0027headers\u0027 === $k) {\n        foreach ($v as $header =\u003e $value) {\n            if (\\in_array(strtolower($header), [\u0027authorization\u0027, \u0027cookie\u0027], true)) {\n                continue;\n            }\n\n            $cleanOptions[\u0027headers\u0027][$header] = $value;\n        }\n\n        continue;\n    }\n\n    if (\u0027basic_auth\u0027 === $k || \u0027bearer_auth\u0027 === $k) {\n        continue;\n    }\n\n    $cleanOptions[$k] = $v;\n}\n```\n\nSymfony HttpClient authentication options are `auth_basic` and `auth_bearer`; Contao\u0027s own manual documents `auth_basic` for crawler Basic Authentication. Because the cleaner only strips `basic_auth` and `bearer_auth`, the \"clean\" default client for non-root-page hosts still carries the real auth options. The existing factory test intends to assert that `Authorization` is not sent to `www.foreign-domain.com`, but its mock client factory ignores the `$defaultOptions` argument, so it does not catch auth options that survive into `HttpClient::create($cleanOptions)`.\n\n\n## Suggested Mitigation\n\nStrip the actual Symfony HttpClient authentication option keys from the clean client. Include NTLM as a defensive extension because Symfony documents it as another auth option.\n\n```diff\n-            if (\u0027basic_auth\u0027 === $k || \u0027bearer_auth\u0027 === $k) {\n+            if (\\in_array($k, [\u0027auth_basic\u0027, \u0027auth_bearer\u0027, \u0027auth_ntlm\u0027, \u0027basic_auth\u0027, \u0027bearer_auth\u0027], true)) {\n                 continue;\n             }\n```\n\nAlso update the factory test so the mock factory records or preserves `$defaultOptions`; otherwise the test does not verify what `HttpClient::create($cleanOptions)` receives in production.\n\n## Impact\n\n- **Direct primitive**: disclosure of crawler Basic/Bearer credentials to an external host reached by the crawler.\n- **Chain potential**: if those credentials protect a staging or pre-publication environment, an attacker can use them to access that environment. The impact depends on what the leaked credential unlocks.\n- **Realistic exploitation**: a content editor adds a link to `https://attacker.example/probe` on a page that the crawler visits. When an administrator or scheduled maintenance run starts the broken-link checker with crawler Basic/Bearer authentication configured, the request to the attacker URL includes the generated `Authorization` header.",
  "id": "GHSA-3mr9-p497-58f6",
  "modified": "2026-08-06T19:43:02Z",
  "published": "2026-08-06T19:43:02Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/contao/contao/security/advisories/GHSA-3mr9-p497-58f6"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-55824"
    },
    {
      "type": "WEB",
      "url": "https://github.com/contao/contao/commit/5bc6e3f900c439313df57aa561d0865792aafa05"
    },
    {
      "type": "WEB",
      "url": "https://github.com/contao/contao/commit/80425d28cdf66280a209bd3f5bc31b1a76901a04"
    },
    {
      "type": "WEB",
      "url": "https://contao.org/en/security-advisories/credentials-disclosure-in-the-crawler"
    },
    {
      "type": "WEB",
      "url": "https://github.com/FriendsOfPHP/security-advisories/blob/master/contao/contao/CVE-2026-55824.yaml"
    },
    {
      "type": "WEB",
      "url": "https://github.com/FriendsOfPHP/security-advisories/blob/master/contao/core-bundle/CVE-2026-55824.yaml"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/contao/contao"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:N/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Contao crawler leaks auth credentials to external hosts"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

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…

Loading…

Loading…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…