Skip to content

fix: anchor Klaviyo proxy endpoint allowlist to the full path shape - #11294

Draft
Michael Pineiro (michaelpineirocontentful) wants to merge 1 commit into
fix/klaviyo-oauth-message-handler-origin-checkfrom
fix/klaviyo-proxy-endpoint-allowlist
Draft

fix: anchor Klaviyo proxy endpoint allowlist to the full path shape#11294
Michael Pineiro (michaelpineirocontentful) wants to merge 1 commit into
fix/klaviyo-oauth-message-handler-origin-checkfrom
fix/klaviyo-proxy-endpoint-allowlist

Conversation

@michaelpineirocontentful

Copy link
Copy Markdown
Contributor

Summary

The Klaviyo proxy function's endpoint allowlist only checked the path segment before the first slash. A value like template-universal-content/../lists passed that check, and the traversal segment let the request reach a Klaviyo API endpoint that was never allowlisted.

Solution

  • Replace the prefix-only check with a pattern anchored to the exact shape the app actually sends: an allowed endpoint name, optionally followed by a single id segment. Anything else is rejected outright.

Context

Third in a small stack of hardening fixes to the Klaviyo app found during a routine security review. Verified the new pattern still matches every endpoint value the frontend currently sends (bare endpoint names and endpoint/{id}), while rejecting traversal and encoded-traversal variants.

Test plan

  • tsc --noEmit passes
  • Functions build (build-functions) succeeds
  • Verified the allowlist pattern against real call sites plus traversal payloads

The proxy's endpoint allowlist only checked the segment before the
first slash, so a value like "template-universal-content/../lists"
passed the check while the traversal segment let the request reach a
Klaviyo endpoint that was never allowlisted.

Replace the prefix check with a pattern anchored to the exact shape
the app actually sends (an allowed endpoint, optionally followed by a
single id segment), rejecting anything else outright.
@wiz-inc-38d59fb8d7

Copy link
Copy Markdown

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities -
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations -
SAST Finding SAST Findings 1 Medium
Software Management Finding Software Management Findings -
Total 1 Medium

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try the Wiz Code extension for VS Code, JetBrains, or Visual Studio.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant