chore(deps): update dependency langchain-core to v1.3.3 [security]#5693
Open
renovate[bot] wants to merge 1 commit intomainfrom
Open
chore(deps): update dependency langchain-core to v1.3.3 [security]#5693renovate[bot] wants to merge 1 commit intomainfrom
renovate[bot] wants to merge 1 commit intomainfrom
Conversation
Generated by renovateBot
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.
This PR contains the following updates:
1.3.2→1.3.3LangChain vulnerable to unsafe deserialization of attacker-controlled objects through overly broad
load()allowlistsCVE-2026-44843 / GHSA-pjwx-r37v-7724
More information
Details
LangChain contains older runtime code paths that deserialize run inputs, run outputs, or other application-controlled payloads using overly broad object allowlists. These paths may call
load()withallowed_objects="all". This does not enable arbitrary Python object deserialization, but it does allow any trusted LangChain-serializable object to be revived, which is broader than these runtime paths require. As a result, attacker-supplied LangChain serialized constructor dictionaries may cause trusted runtime paths to instantiate classes with untrusted constructor arguments.Applications are exposed only when all of the following are true:
Known affected runtime surfaces include:
RunnableWithMessageHistoryastream_log()astream_events(version="v1")Related unsafe deserialization patterns may also affect applications that explicitly load serialized LangChain prompt or runnable objects from untrusted sources, including shared prompt stores, Hub artifacts with model configuration, or other application-controlled serialization stores.
Applications that validate incoming requests against a fixed schema, such as coercing user input to a plain string or message-content field before invoking LangChain, are unlikely to expose this deserialization primitive.
This release also fixes a related secret-marker validation bypass in the serialization and deserialization layer (
_is_lc_secret). That issue creates an additional path by which attacker-controlled constructor dictionaries can avoid escaping duringdumps()->loads()round-trips and reach LangChain object revival logic.Impact
An attacker who can submit untrusted structured input to an affected application, and have that structure preserved in LangChain run data, may be able to inject LangChain serialized constructor payloads such as:
{ "lc": 1, "type": "constructor", "id": ["langchain_core", "messages", "ai", "AIMessage"], "kwargs": {"content": "attacker-controlled content"} }If this payload reaches a broad
load()call, LangChain may instantiate the referenced class instead of treating the payload as inert user data.Realistic impacts include:
AIMessage,HumanMessage, orSystemMessageobjects are stored byRunnableWithMessageHistory.Remediation
LangChain will deprecate the affected APIs as part of this fix:
RunnableWithMessageHistoryastream_log()astream_events(version="v1")These are older code paths that are no longer recommended for new applications. They were not previously marked as deprecated, but recent LangChain documentation has primarily directed users toward newer streaming and memory patterns, including the
streamAPI. Applications should migrate to the currently recommended APIs rather than continue depending on these older surfaces.Separately, LangChain will update
load()andloads()to tighten deserialization behavior so broad object revival is not applied implicitly to untrusted or application-controlled payloads. The older runtime surfaces listed above are being deprecated rather than preserved as supported paths for broad runtime deserialization.This release also fixes a related secret-marker validation bypass in the serialization and deserialization layer (
_is_lc_secret). That issue creates an additional path by which attacker-controlled constructor dictionaries can avoid escaping duringdumps()->loads()round-trips and reach LangChain object revival logic.Guidance for
load()andloads()load()andloads()should be used only with trusted LangChain manifests or serialized objects from trusted storage. Do not pass user-controlled data toload()orloads(), and do not use them as general parsers for request bodies, tool inputs, chat messages, or other attacker-controlled data.load()andloads()are beta APIs, and their behavior may change as LangChain narrows unsafe defaults. Future LangChain versions will require callers to be explicit about which objects may be revived. Users should pass a narrowallowed_objectsvalue appropriate for the specific trusted manifest they are loading, rather than relying on broad defaults orallowed_objects="all", which permits the full trusted LangChain serialization allowlist.Credits
The original issue was first reported by @u-ktdi.
Similar findings were reported by @dewankpant, @shrutilohani, @Moaaz-0x, @pucagit.
A related
_is_lc_secretmarker bypass affectingdumps()->loads()round-trips was reported by @yardenporat353 (and a similar report by @localhost-detect)Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.