Skip to content

fix(destination-pinecone): bump CDK to >=7.7.0 to address CVE-2025-68664 in langchain-core - #76341

Draft
Aaron ("AJ") Steers (aaronsteers) wants to merge 6 commits into
masterfrom
devin/1776229493-fix-destination-pinecone-langchain-cve
Draft

Aaron ("AJ") Steers (aaronsteers) wants to merge 6 commits into
masterfrom
devin/1776229493-fix-destination-pinecone-langchain-cve

Conversation

@aaronsteers

@aaronsteers Aaron ("AJ") Steers (aaronsteers) commented Apr 15, 2026 •

Copy link
Copy Markdown
Member

What

Addresses CVE-2025-68664 — a critical (CVSS 9.3) serialization injection vulnerability in langchain-core < 0.3.81. The destination-pinecone connector inherits this vulnerability transitively through its CDK dependency (airbyte-cdk[vector-db-based]), which was pinned to <2.0.0 and resolved langchain_core==0.1.42.

The CDK already ships patched langchain dependencies (langchain_core >= 1.2.5) since airbytehq/airbyte-python-cdk#874 (included in CDK v7.7.0+). This PR bumps the connector's CDK constraint so it picks up the fix.

Also adds a manifest-only readback source connector for E2E verification of data written to Pinecone (since Pinecone is a vector DB and doesn't support the standard SQL-based readback used by the smoke test skill).

Related oncall issue: airbytehq/oncall#11744

How

  • Bumped airbyte-cdk from <2.0.0 to >=7.7.0 (with vector-db-based extras).
  • Bumped minimum Python from ^3.9 to ^3.10 (required by CDK 4.0+).
  • Regenerated poetry.lock, which now resolves langchain_core >=1.2.5 (patched) instead of 0.1.42 (vulnerable).
  • Updated config.py to import from pydantic.v1 instead of pydantic, matching the CDK's VectorDBConfigModel base class which uses Pydantic v1 models. Without this, Pydantic v1 raises RuntimeError: no validator found when the v2-based PineconeIndexingModel is used as a field in a v1-based parent.
  • Migrated destination.py imports from the removed airbyte_protocol package to airbyte_cdk.models. Moved AirbyteLogMessage, Level, and DestinationSyncMode into the top-level import block (previously these were lazy-imported from airbyte_protocol.models.airbyte_protocol inside _log() and write()).
  • Updated pinecone_indexer_test.py to construct ConfiguredAirbyteCatalog directly via keyword arguments instead of parse_obj(). CDK v7 protocol models are dataclasses, not Pydantic models, so parse_obj no longer exists.
  • Added integration_tests/readback_manifest.yaml — a manifest-only YAML source connector that reads back from the same Pinecone index after a smoke test write. Uses DynamicDeclarativeStream + HttpComponentsResolver to handle Pinecone's two-tier API (control plane host resolution → data plane queries). Validated with connector-builder-mcp's validate_manifest tool. Convention: integration_tests/readback_manifest.yaml is intended to be reusable across future destination connectors needing non-SQL readback.

Review guide

  1. pyproject.toml — CDK version bump (<2.0.0 → >=7.7.0) and Python version bump (^3.9 → ^3.10).
  2. destination_pinecone/config.py — single-line import change: from pydantic import … → from pydantic.v1 import ….
  3. destination_pinecone/destination.py — replaced from airbyte_protocol.models.airbyte_protocol inline imports with top-level from airbyte_cdk.models imports.
  4. unit_tests/pinecone_indexer_test.py — replaced ConfiguredAirbyteCatalog.parse_obj({…}) with direct dataclass construction.
  5. poetry.lock — regenerated; verify langchain_core version is >=1.2.5.
  6. integration_tests/readback_manifest.yaml — new manifest-only source connector for E2E readback. Three streams:
    • index_info: control-plane metadata (GET /indexes/{index}) — used as connection check
    • namespace_stats: vector counts per namespace (POST /describe_index_stats) — primary readback signal
    • list_vector_ids: individual vector IDs (GET /vectors/list) — serverless indexes only

Key risks to verify

  • CDK major version jump (<2.0.0 → >=7.7.0): The connector still uses Pydantic v1 patterns (parse_obj, schema(), class Config) for its own models via pydantic.v1. This is correct since VectorDBConfigModel uses pydantic.v1, but CI tests should confirm full runtime compatibility.
  • ConfigModel.parse_obj() and ConfigModel.schema() still used in destination.py: These are valid because ConfigModel extends VectorDBConfigModel which is a pydantic.v1.BaseModel. However, if the CDK ever migrates VectorDBConfigModel away from pydantic.v1, these calls would break.
  • No upper bound on CDK version (>=7.7.0): Consistent with other vector DB connectors (e.g., pgvector uses >=1.0), but worth noting.
  • Python 3.9 dropped: Required by CDK 4.0+. Confirm this is acceptable for this connector.
  • Readback manifest uses HttpComponentsResolver: This is marked "experimental" in the CDK. The placeholder.pinecone.io in the dynamic stream templates' url_base is intentional — it gets overridden at runtime by ComponentMappingDefinition injecting the resolved host from the control plane response. The manifest has not been tested against a live Pinecone index.

Human review checklist

  • Verify no other files in the connector import from pydantic directly (should all use pydantic.v1 for CDK compat)
  • Verify no remaining references to airbyte_protocol package
  • Confirm langchain_core >=1.2.5 appears in the regenerated lock file
  • Check that the generate_catalog() test helper constructs equivalent objects to the previous parse_obj dict
  • Check CI test results for runtime errors
  • Review readback manifest streams and verify Pinecone API endpoint usage is correct
  • Confirm integration_tests/readback_manifest.yaml path convention is acceptable for future destinations

User Impact

Resolves a critical security vulnerability (CVE-2025-68664) that could allow secret exfiltration or code execution via prompt injection through LangChain's serialization functions. Also provides tooling for future E2E verification of Pinecone writes.

Can this PR be safely reverted and rolled back?

  • YES 💚

Link to Devin session: https://app.devin.ai/sessions/1012ab4c5c264184aeff8068d3c43d1e
Requested by: Aaron ("AJ") Steers (@aaronsteers)

@devin-ai-integration

Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@github-actions

Copy link
Copy Markdown
Contributor

👋 Greetings, Airbyte Team Member!

Here are some helpful tips and reminders for your convenience.

💡 Show Tips and Tricks

PR Slash Commands

Airbyte Maintainers (that's you!) can execute the following slash commands on your PR:

  • 🛠️ Quick Fixes
    • /format-fix - Fixes most formatting issues.
    • /bump-version - Bumps connector versions, scraping changelog description from the PR title.
      • Bump types: patch (default), minor, major, major_rc, rc, promote.
      • The rc type is a smart default: applies minor_rc if stable, or bumps the RC number if already RC.
      • The promote type strips the RC suffix to finalize a release.
      • Example: /bump-version type=rc or /bump-version type=minor
    • /bump-progressive-rollout-version - Alias for /bump-version type=rc. Bumps with an RC suffix and enables progressive rollout.
  • ❇️ AI Testing and Review (internal link: AI-SDLC Docs):
    • /ai-prove-fix - Runs prerelease readiness checks, including testing against customer connections.
    • /ai-canary-prerelease - Rolls out prerelease to 5-10 connections for canary testing.
    • /ai-review - AI-powered PR review for connector safety and quality gates.
  • 🚀 Connector Releases:
    • /publish-connectors-prerelease - Publishes pre-release connector builds (tagged as {version}-preview.{git-sha}) for all modified connectors in the PR.
  • ☕️ JVM connectors:
    • /update-connector-cdk-version connector=<CONNECTOR_NAME> - Updates the specified connector to the latest CDK version.
      Example: /update-connector-cdk-version connector=destination-bigquery
  • 🐍 Python connectors:
    • /poe connector source-example lock - Run the Poe lock task on the source-example connector, committing the results back to the branch.
    • /poe source example lock - Alias for /poe connector source-example lock.
    • /poe source example use-cdk-branch my/branch - Pin the source-example CDK reference to the branch name specified.
    • /poe source example use-cdk-latest - Update the source-example CDK dependency to the latest available version.
  • ⚙️ Admin commands:
    • /force-merge reason="<REASON>" - Force merges the PR using admin privileges, bypassing CI checks. Requires a reason.
      Example: /force-merge reason="CI is flaky, tests pass locally"
📚 Show Repo Guidance

Helpful Resources

📝 Edit this welcome message.

@github-actions

github-actions Bot commented Apr 15, 2026 •

Copy link
Copy Markdown
Contributor

destination-pinecone Connector Test Results

29 tests   27 ✅  13s ⏱️
 2 suites   2 💤
 2 files     0 ❌

Results for commit 8b8b990.

♻️ This comment has been updated with latest results.

devin-ai-integration Bot and others added 6 commits June 17, 2026 16:18
- Replace airbyte_protocol imports with airbyte_cdk.models (airbyte_protocol
  package no longer exists in CDK v7+)
- Replace ConfiguredAirbyteCatalog.parse_obj() with direct construction
  (CDK models migrated from Pydantic to dataclasses)
Adds a manifest-only YAML source connector (readback_manifest.yaml) in
integration_tests/ that reads back from Pinecone after the smoke test
writes data. Uses DynamicDeclarativeStream + HttpComponentsResolver to
handle Pinecone's two-tier API (control plane host resolution -> data
plane queries).

Streams:
- index_info: control-plane metadata (connection check)
- namespace_stats: vector counts per namespace (primary readback signal)
- list_vector_ids: individual vector IDs (serverless only)

Convention: integration_tests/readback_manifest.yaml — reusable across
future destination connectors that need non-SQL readback verification.
Co-Authored-By: AJ Steers <aj@airbyte.io>
Co-Authored-By: AJ Steers <aj@airbyte.io>
@devin-ai-integration
devin-ai-integration Bot force-pushed the devin/1776229493-fix-destination-pinecone-langchain-cve branch from b7a45e1 to 8b8b990 Compare June 17, 2026 16:18
@github-actions

Copy link
Copy Markdown
Contributor

Deploy preview for airbyte-docs ready!

Project:airbyte-docs
Status: ✅  Deploy successful!
Preview URL:https://airbyte-docs-83vlxkb7z-airbyte-growth.vercel.app
Latest Commit:8b8b990

Deployed with vercel-action

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants