Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2024-58340— LangChain <= 0.3.1 MRKLOutputParser ReDoS

Quick assessment

Affected
LangChain AI LangChain
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

LangChain是LangChain开源的一个用于开发由大型语言模型 (LLM) 提供支持的应用程序的框架。 LangChain 0.3.1及之前版本存在安全漏洞,该漏洞源于MRKLOutputParser.parse方法使用易受回溯攻击的正则表达式,可能导致正则表达式拒绝服务攻击。

AI Predicted 5.3 Difficulty: Moderate EPSS 0.47% · P38

Possible ATT&CK Techniques 1 AI

T1499.002 · Service Exhaustion Flood

Affected Version Matrix 1

VendorProduct Version RangeStatus
LangChain AI LangChain ≤ 0.3.1 affected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2024-58340

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
LangChain <= 0.3.1 MRKLOutputParser ReDoS
Source: CVE Program / CVE List V5
Vulnerability Description
LangChain versions up to and including 0.3.1 contain a regular expression denial-of-service (ReDoS) vulnerability in the MRKLOutputParser.parse() method (libs/langchain/langchain/agents/mrkl/output_parser.py). The parser applies a backtracking-prone regular expression when extracting tool actions from model output. An attacker who can supply or influence the parsed text (for example via prompt injection in downstream applications that pass LLM output directly into MRKLOutputParser.parse()) can trigger excessive CPU consumption by providing a crafted payload, causing significant parsing delays and a denial-of-service condition.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Source: CVE Program / CVE List V5
Vulnerability Type
CWE-1333
Source: CVE Program / CVE List V5
Vulnerability Title
LangChain 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
LangChain是LangChain开源的一个用于开发由大型语言模型 (LLM) 提供支持的应用程序的框架。 LangChain 0.3.1及之前版本存在安全漏洞,该漏洞源于MRKLOutputParser.parse方法使用易受回溯攻击的正则表达式,可能导致正则表达式拒绝服务攻击。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
LangChain AI LangChain 0 ~ 0.3.1 -

II. Public POCs for CVE-2024-58340

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2024-58340

请登录查看更多情报信息。

IV. Related Vulnerabilities

V. Comments for CVE-2024-58340

No comments yet


Leave a comment