Skip to content

feat(backend): Remediate ADA-KUBEFL-01: Server-Side Request Forgery#12750

Open
JerT33 wants to merge 1 commit intokubeflow:masterfrom
JerT33:feat/ssrf_prevention
Open

feat(backend): Remediate ADA-KUBEFL-01: Server-Side Request Forgery#12750
JerT33 wants to merge 1 commit intokubeflow:masterfrom
JerT33:feat/ssrf_prevention

Conversation

@JerT33
Copy link
Contributor

@JerT33 JerT33 commented Jan 31, 2026

Description of your changes:

Background

Fixes SSRF vulnerability (ADA-KUBEFL-01) in CreatePipelineV1/V2 APIs where user-provided URLs are fetched without destination validation

Recommended remediation
Restrict where the backend will fetch from and validate the final destination:
• Replace arbitrary URLs with file uploads or server-generated pre-signed URLs for controlled object storage.
• If URLs must remain, enforce an allow-list of trusted domains; block private/loopback/link-local/metadata IP ranges
after DNS resolution and on every redirect; restrict schemes/ports (prefer https:// on standard ports); and use tight
timeouts.

To avoid disruption of any current users who rely on URLs for pipeline upload functionality, the following remediations have been completed:

  • Domain allow-list
  • Block private/loopback/link-local/metadata IP ranges
  • DNS resolution before request
  • Validation on every redirect
  • Restrict schemes
  • Restrict ports
  • Request timeout

Logic:

Validate Pipeline URL:

  1. Scheme check
    • https required by default
    • user controlled http allowance
  2. Port check
    • https restricted to port 443
    • http restricted to port 80
  3. DNS allow-list check
    • validate DNS against a preset list of common DNS
      • github
      • aws s3
      • google cloud storage
    • user controlled additional allowed DNS
  4. DNS resolution
  5. IP check
    • validate against a preset non-configurable blacklist of CIDR ranges
      • private
      • loopback
      • link-local
      • metadata
      • invalid

SafePipelineHTTPClient:

  • Implement timeouts
    • defaults to 30 seconds
    • user controlled override
  • Restrict redirects
    • maximum of 10
    • validate pipeline url on every redirect

General:

  • Prevent XSS attacks by returning generic error messages, but log full error report

User-configurable options:

  • PIPELINE_URL_ALLOWED_DOMAINS: extend the default domain allow-list
  • PIPELINE_URL_ALLOW_HTTP: allow HTTP URLs (default false)
  • PIPELINE_URL_TIMEOUT: configure request timeout in seconds (default 30)
  • PIPELINE_URL_VALIDATION_ENABLED: toggle pipeline url validation - for testing purposes (default true)

Live Cluster Testing Evidence

Before:

Screenshot 2026-02-04 at 10 42 49 PM Screenshot 2026-02-04 at 10 48 56 PM Screenshot 2026-02-04 at 10 43 58 PM

After

Screenshot 2026-02-04 at 11 16 55 PM Screenshot 2026-02-04 at 11 16 47 PM Screenshot 2026-02-04 at 11 17 10 PM (no additional URL fetch from latest test)

Checklist:

@google-oss-prow
Copy link

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@google-oss-prow
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign hbelmiro for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@JerT33 JerT33 force-pushed the feat/ssrf_prevention branch from 15d0c68 to 40b7c76 Compare February 1, 2026 18:46
@google-oss-prow google-oss-prow bot added size/L and removed size/XS labels Feb 1, 2026
@JerT33 JerT33 force-pushed the feat/ssrf_prevention branch from 40b7c76 to b45a203 Compare February 1, 2026 18:49
@JerT33 JerT33 changed the title feat(): Remediate ADA-KUBEFL-01: Server-Side Request Forgery feat(backend): Remediate ADA-KUBEFL-01: Server-Side Request Forgery Feb 1, 2026
@JerT33 JerT33 force-pushed the feat/ssrf_prevention branch 12 times, most recently from 8c2670a to c51b0e9 Compare February 5, 2026 02:59
@JerT33 JerT33 marked this pull request as ready for review February 5, 2026 04:22
@JerT33 JerT33 force-pushed the feat/ssrf_prevention branch from c51b0e9 to f78476d Compare February 5, 2026 23:55
inital layout for pipeline url validation

Signed-off-by: JerT33 <trestjeremiah@gmail.com>

revert dummy commit

Signed-off-by: JerT33 <trestjeremiah@gmail.com>

fix de morgans law failure

Signed-off-by: JerT33 <trestjeremiah@gmail.com>

minor updates

Signed-off-by: JerT33 <trestjeremiah@gmail.com>

more refinements

Signed-off-by: JerT33 <trestjeremiah@gmail.com>

adjust cidrs

Signed-off-by: JerT33 <trestjeremiah@gmail.com>

fix tests

Signed-off-by: JerT33 <trestjeremiah@gmail.com>

remove multicast

Signed-off-by: JerT33 <trestjeremiah@gmail.com>

fix formatting

Signed-off-by: JerT33 <trestjeremiah@gmail.com>

fix lint and tests

Signed-off-by: JerT33 <trestjeremiah@gmail.com>
@JerT33 JerT33 force-pushed the feat/ssrf_prevention branch from f78476d to f0f7a7e Compare February 7, 2026 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant