datamodel-code-generator@0.62.0

Datamodel Code Generator

  • latest version

    0.72.0

  • latest non vulnerable version

  • first published

    7 years ago

  • latest version published

    6 hours ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the datamodel-code-generator package. This does not include vulnerabilities belonging to this package’s dependencies.

    Fix vulnerabilities automatically

    Snyk's AI Trust Platform automatically finds the best upgrade path and integrates with your development workflows. Secure your code at zero cost.

    Fix for free
    VulnerabilityVulnerable Version
    • H
    Exposure of Private Personal Information to an Unauthorized Actor

    datamodel-code-generator is a Datamodel Code Generator

    Affected versions of this package are vulnerable to Exposure of Private Personal Information to an Unauthorized Actor via the get_body function. An attacker can obtain sensitive authorization headers by causing a redirect to a different origin, resulting in the disclosure of credentials to an unauthorized host.

    How to fix Exposure of Private Personal Information to an Unauthorized Actor?

    Upgrade datamodel-code-generator to version 0.63.0 or higher.

    [,0.63.0)
    • H
    Server-side Request Forgery (SSRF)

    datamodel-code-generator is a Datamodel Code Generator

    Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) through the get_body function, which performs DNS resolution validation separately from the actual HTTP connection. An attacker can access internal network resources and potentially retrieve sensitive information by exploiting a DNS rebinding technique that causes the validated hostname to resolve to a public IP during validation and a private/internal IP during connection. This allows bypassing of network access controls and may result in exposure of internal services or credentials.

    How to fix Server-side Request Forgery (SSRF)?

    Upgrade datamodel-code-generator to version 0.63.0 or higher.

    [,0.63.0)
    • H
    Eval Injection

    datamodel-code-generator is a Datamodel Code Generator

    Affected versions of this package are vulnerable to Eval Injection via unsanitized input in the from_full_path and create_line functions. An attacker can execute arbitrary code at import time by supplying malicious schema extensions that inject statements into generated import lines.

    How to fix Eval Injection?

    Upgrade datamodel-code-generator to version 0.64.0 or higher.

    [0.11.6,0.64.0)
    • H
    Arbitrary Code Injection

    datamodel-code-generator is a Datamodel Code Generator

    Affected versions of this package are vulnerable to Arbitrary Code Injection via the customBasePath schema field. An attacker can execute arbitrary Python code by supplying a specially crafted value containing embedded newlines and a dot-free Python expression, which is inserted verbatim into a generated import statement without proper validation. This code is then executed when the generated module is imported.

    How to fix Arbitrary Code Injection?

    Upgrade datamodel-code-generator to version 0.70.0 or higher.

    [,0.70.0)