Third party service integration issues#


Description#

Third-party service integration issues arise when web applications incorporate external services (e.g., payment gateways, analytics/CDNs, social login providers, APIs, scripts, or libraries). These integrations expand the attack surface by introducing untrusted code, data flows, and trust boundaries. Without proper controls, they enable supply chain attacks, data leakage, injection flaws, and authentication bypasses - often because developers treat third-party components as inherently safe.

Almost every app depends on outside services: a CDN for JS libraries, a “Login with Google” button, a payment gateway, a Slack/Stripe webhook, an npm package. Each of these is a door into the app that the app’s own team doesn’t fully control.

The core problem: developers trust these doors more than they should. They validate what a user types very carefully, but they often skip validation on data or code that comes back from a third party, on the assumption that partners and vendors are automatically safe. They aren’t. If a vendor’s CDN gets hacked, or a partner API can be manipulated, or an OAuth login flow has a loose check somewhere - that trust gap becomes your entry point.

Maps to: OWASP API10:2023 (Unsafe Consumption of APIs), A08:2021 (Software & Data Integrity Failures) overlap, CWE-829 (Inclusion of Functionality from Untrusted Control Sphere).


Understanding Third-Party Integrations#

Trust Boundaries#

Every third-party integration introduces a new trust boundary. Even if the external service itself is legitimate, the application must treat every response, callback, script, or authentication token as untrusted until it is validated.

Typical trust relationships include:

  • Browser ↔ Third-party JavaScript
  • Application ↔ External APIs
  • Identity Provider ↔ OAuth/OIDC Client
  • Payment Gateway ↔ Webhook Endpoint
  • CI/CD ↔ Dependency Registries (npm, PyPI, Maven)

A compromise at any point can directly affect the application.


Common Third-Party Components#

  • CDN-hosted JavaScript
  • Analytics platforms
  • Payment gateways
  • OAuth/OIDC providers
  • SAML Identity Providers
  • Maps & Geolocation APIs
  • SMS / Email providers
  • Webhooks
  • Chat widgets
  • Advertisement scripts
  • Feature flag providers
  • Package managers (npm, pip, Maven)

Attack Surface#

  • Client-side script/tag inclusion: <script src="cdn.vendor.com/...">, tag managers (GTM), iframes, dynamic imports
  • OAuth/OIDC/SAML login flows and redirect handlers
  • Server-side calls to external APIs (address validation, payment, geocoding, enrichment services)
  • Webhook receivers (Stripe, GitHub, Slack, Twilio callbacks)
  • npm/pip/Maven dependencies and their transitive chain
  • Source maps and bundled JS shipping secrets
  • Third-party plugin ecosystems (WordPress, Shopify apps, browser extensions)

Common Third-Party Integration Weaknesses#

  • Missing validation of third-party responses
  • Trusting webhook payloads without signature verification
  • Wildcard OAuth redirect URIs
  • Missing OAuth state validation
  • Third-party JavaScript without SRI
  • Exposed API keys in frontend bundles
  • Loading outdated third-party libraries
  • Package dependency confusion
  • Dependency hijacking
  • Expired CDN or vendor domains
  • Blind trust of partner APIs
  • Over-privileged API keys
  • Missing certificate validation
  • Weak TLS configuration when calling external APIs

Exploitation Techniques#

1. Unsafe Consumption of Third-Party APIs (OWASP API10:2023)#

Why this happens: the app’s developers wrote strict validation for anything the user types directly into a form. But data that arrives indirectly - through an address-lookup service, a partner API, a webhook - often skips that same validation, because the developer assumes “this came from our trusted partner, not a random user.” If you, the attacker, can control what that partner service returns (e.g. you submit your own address to an autocomplete field, or you control a webhook payload), you’ve smuggled attacker input in through a channel nobody is filtering.

Where to look: any field sourced from a third-party integration that gets rendered, queried, or used in a redirect without re-validation - KYC/identity verification responses, marketplace product feeds, partner-submitted webhook data.

2. Third-Party JavaScript / Script Inclusion Issues#

Why this happens: when a browser loads