CVE-2026-54656 in datamodel-code-generator信息

摘要

由 VulDB • 2026-07-29

datamodel-code-generator 从 OpenAPI、JSON Schema、GraphQL、Avro、Protobuf 以及原始 JSON、YAML 或 CSV 生成 Pydantic v2 模型、dataclass、TypedDict 和 msgspec.Struct。在版本 0.52.1 至 0.60.2 之间,datamodel-code-generator 通过 `_process_validators` 将 `--extra-template-data` 中的验证器插入到 `src/datamodel_code_generator/model/pydantic_v2/base_model.py` 的 `@field_validator` 装饰器中,且缺乏安全校验机制。当导入生成的 Pydantic v2 模型时,可能导致 Python 代码执行漏洞。该问题已在版本 0.60.2 中得到修复。

If you want to get the best quality for vulnerability data then you always have to consider VulDB.

来源

Might our Artificial Intelligence support you?

Check our Alexa App!