GHSA-2MR3-RXRQ-238C

Vulnerability from github – Published: 2026-11-20 00:10 – Updated: 2026-11-20 00:10
VLAI
Summary
Flyto2 Core: http.paginate follows server-supplied next-page URLs (Link header / cursor) without SSRF revalidation
Details

Summary

http.paginate validates only the initial base_url, then follows server-supplied pagination targets (RFC 5988 Link: rel="next" headers, cursor/offset URLs) in a loop without revalidating each follow-up URL. An attacker's first-page response can point next at an internal address, causing a second-order SSRF whose internal body is aggregated into the returned items.

Root Cause

src/core/modules/atomic/http/paginate.py:495 validates base_url (first URL only). The pagination loop _paginate_link_header reads next_url via _parse_link_header (:203), sets url=next_url (:208), and calls session.request(method, url) (:196) with NO validate call in the loop (:186-208 has zero guard calls).

Impact

Readable second-order SSRF that bypasses the SSRF control; internal/metadata body aggregated into all_items and returned to the caller (C:H, S:C).

Proof of Concept

Verified live: http.paginate with allowlisted base 127.0.0.1 followed a Link: <http://127.0.0.3/...>; rel="next" (non-allowlisted) and returned INTERNAL-NEXTPAGE-SECRET in the aggregated items.

execute_module http.paginate {"url":"http://attacker.tld/p1","strategy":"link_header"}
attacker p1 response header: Link: <http://<cloud-metadata-ip>/latest/meta-data/>; rel="next"

Attack Chain

  1. Entry: http.paginate {url:"http://attacker.tld/p1", strategy:"link_header"}. Guard: validate_url_with_env_config(base_url) (paginate.py:495) — validates the FIRST url only.
  2. Sink: _paginate_link_header reads next_url (_parse_link_header :203), url=next_url (:208), session.request(method,url) (:196) — NO validate call in the loop. Bypass proof: only :495 validates; loop at :186-208 has zero guard calls.
  3. Impact: internal body aggregated into all_items and returned → readable second-order SSRF.

Bypass Evidence

Live PoC followed a Link header into non-allowlisted loopback and returned the internal marker in aggregated results. Only base_url is validated; the follow loop never revalidates.

Affected Versions

<= 2.26.6 — paginate.py:495 + loop present on latest release tag.

Suggested Fix

Run every follow-up URL (Link header, cursor, offset target) through validate_url_with_env_config before fetching it inside the pagination loop.

Credit

Vulnerability discovered by zx (Jace).

Show details on source website

{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 2.26.7"
      },
      "package": {
        "ecosystem": "PyPI",
        "name": "flyto-core"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "2.26.8"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-77315"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-918"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-11-20T00:10:14Z",
    "nvd_published_at": null,
    "severity": "HIGH"
  },
  "details": "## Summary\n`http.paginate` validates only the initial `base_url`, then follows server-supplied pagination targets (RFC 5988 `Link: rel=\"next\"` headers, cursor/offset URLs) in a loop **without revalidating each follow-up URL**. An attacker\u0027s first-page response can point `next` at an internal address, causing a second-order SSRF whose internal body is aggregated into the returned items.\n\n## Root Cause\n`src/core/modules/atomic/http/paginate.py:495` validates `base_url` (first URL only). The pagination loop `_paginate_link_header` reads `next_url` via `_parse_link_header` (:203), sets `url=next_url` (:208), and calls `session.request(method, url)` (:196) with NO validate call in the loop (:186-208 has zero guard calls).\n\n## Impact\nReadable second-order SSRF that bypasses the SSRF control; internal/metadata body aggregated into `all_items` and returned to the caller (C:H, S:C).\n\n## Proof of Concept\nVerified live: `http.paginate` with allowlisted base `127.0.0.1` followed a `Link: \u003chttp://127.0.0.3/...\u003e; rel=\"next\"` (non-allowlisted) and returned `INTERNAL-NEXTPAGE-SECRET` in the aggregated items.\n```\nexecute_module http.paginate {\"url\":\"http://attacker.tld/p1\",\"strategy\":\"link_header\"}\nattacker p1 response header: Link: \u003chttp://\u003ccloud-metadata-ip\u003e/latest/meta-data/\u003e; rel=\"next\"\n```\n\n## Attack Chain\n1. Entry: `http.paginate {url:\"http://attacker.tld/p1\", strategy:\"link_header\"}`. Guard: `validate_url_with_env_config(base_url)` (paginate.py:495) \u2014 validates the FIRST url only.\n2. Sink: `_paginate_link_header` reads `next_url` (`_parse_link_header` :203), `url=next_url` (:208), `session.request(method,url)` (:196) \u2014 NO validate call in the loop. Bypass proof: only :495 validates; loop at :186-208 has zero guard calls.\n3. Impact: internal body aggregated into `all_items` and returned \u2192 readable second-order SSRF.\n\n## Bypass Evidence\nLive PoC followed a `Link` header into non-allowlisted loopback and returned the internal marker in aggregated results. Only `base_url` is validated; the follow loop never revalidates.\n\n## Affected Versions\n`\u003c= 2.26.6` \u2014 `paginate.py:495` + loop present on latest release tag.\n\n## Suggested Fix\nRun every follow-up URL (Link header, cursor, offset target) through `validate_url_with_env_config` before fetching it inside the pagination loop.\n\n## Credit\n\nVulnerability discovered by zx (Jace).",
  "id": "GHSA-2mr3-rxrq-238c",
  "modified": "2026-11-20T00:10:14Z",
  "published": "2026-11-20T00:10:14Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/flytohub/flyto-core/security/advisories/GHSA-2mr3-rxrq-238c"
    },
    {
      "type": "WEB",
      "url": "https://github.com/flytohub/flyto-core/commit/bbb6f1cfec22fee1ea0e6ecf1129d7103c85e09f"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/flytohub/flyto-core"
    },
    {
      "type": "WEB",
      "url": "https://github.com/flytohub/flyto-core/releases/tag/v2.26.8"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Flyto2 Core: http.paginate follows server-supplied next-page URLs (Link header / cursor) without SSRF revalidation"
}



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…