fix(fel): 升级 langchain-core 修复反序列化漏洞 #403
Merged
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.
🔗 相关问题 / Related Issue
Issue 链接 / Issue Link: Dependabot Alert
📋 变更类型 / Type of Change
📝 变更目的 / Purpose of the Change
修复 Dependabot 安全告警:langchain-core 存在严重的序列化注入漏洞 (CVE-2025-68664, GHSA-c67j-w6g6-q2cm)。
漏洞详情:
'lc'键的字典,攻击者可以通过注入恶意序列化结构提取环境变量(如 API 密钥)或实例化恶意类风险评估:
dumps/loads)📋 主要变更 / Brief Changelog
langchain-core从 0.3.68 到 0.3.81(小版本升级)langchain_community==0.3.27,langchain-openai==0.3.28,llama-index==0.12.46)变更文件:
framework/fel/python/requirements.txt- 1 行修改🧪 验证变更 / Verifying this Change
测试步骤 / Test Steps
导入测试:验证核心 langchain-core 类正常导入
功能测试:
安全验证:
兼容性验证:
测试覆盖 / Test Coverage
测试验证:
📸 截图 / Screenshots
N/A
✅ 贡献者检查清单 / Contributor Checklist
基本要求 / Basic Requirements:
代码质量 / Code Quality:
测试要求 / Testing Requirements:
mvn -B clean package -Dmaven.test.skip=true/ Basic checks passmvn clean install/ Unit tests pass文档和兼容性 / Documentation and Compatibility:
📋 附加信息 / Additional Notes
技术实现细节
升级策略:
依赖兼容性分析:
llama-index==0.12.46:不依赖 langchain-core(已通过 PyPI API 验证)langchain_community==0.3.27:同为 0.3.x 系列,兼容langchain-openai==0.3.28:同为 0.3.x 系列,兼容安全加固措施 (0.3.81 版本引入):
dumps()/dumpd()的转义 bug,正确转义'lc'键load()/loads()安全默认值:secrets_from_env=False(默认不加载环境变量)allowed_objects='core'(限制可反序列化的类)影响评估:
回滚方案
如果升级后出现问题,可以快速回滚:
回滚预计时间: 15-30 分钟
风险控制
后续监控
建议升级后监控以下指标(7 天):
参考资源
审查者注意事项 / Reviewer Notes:
重点关注:
验证建议:
合并后操作:
🤖 Generated with Claude Code