fix: upgrade langchain-core to address CVE-2025-68664 - #606
Merged
Conversation
eliseong
approved these changes
Aug 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Bumps
langchain-core0.2.1 → 0.3.81 andpydantic2.4.0 → 2.7.4 in both backend requirements files of the gen-ai-chatbot blueprint. langchain-core versions before 0.3.81 are vulnerable to CVE-2025-68664; pydantic must be >=2.7.4 for langchain-core 0.3.x.langchain-core 0.3 moves its base classes to native pydantic v2, which silently disables v1-style validators registered via the
langchain_core.pydantic_v1shim. Five files underapp/agents/are migrated to pydantic v2 APIs (@model_validator/@field_validator,ConfigDict,model_fields) so the agent feature keeps working.Testing
AgentExecutorconstruction fails on langchain-core 0.3.x (test_create_react_agent); with it, the test passes construction againtest_langchain.py,test_stream.py) with live AWS credentials: model invocation and streaming succeed through the migrated agent code on langchain-core 0.3.81 (Mistral variants; the Claude variants fail only because the tests hardcode the now-retiredclaude-v3-haikumodel, unrelated to this change)requirements.txtinstalls cleanly on thepython:3.11.6-slim-bookwormbase imageIssues