{"answers":{"affected":"7 open source packages ship an affected version, including pydantic. It affects 2 products.","exploited":"There is no known exploitation of CVE-2021-29510 in the wild and no public exploit code.","fix":"Upgrade pydantic to a fixed version for your release line: 1.6.2, 1.7.4 or 1.8.2.","what":"CVE-2021-29510 is a low-severity denial of service vulnerability in Fedoraproject Fedora, published on 13 May 2021. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2021-29510 and fix it if it is affected.\n\nWhat it is: CVE-2021-29510 is a low-severity denial of service vulnerability in Fedoraproject Fedora, published on 13 May 2021. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2021-29510 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- pydantic (PyPI): affected all versions; fixed in 1.6.2, 1.7.4, 1.8.2\n- pydantic (PyPI): affected all versions; fixed in 1.6.2\n- pydantic (PyPI): affected all versions; fixed in 1.6.2\n- pydantic (PyPI): affected from 1.7; fixed in 1.7.4\n- pydantic (PyPI): affected from 1.7; fixed in 1.7.4\n- pydantic (PyPI): affected from 1.8; fixed in 1.8.2\n- pydantic (PyPI): affected from 1.8; fixed in 1.8.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2021-29510/ (Markdown: https://insights.sbomify.com/CVE-2021-29510/index.md)","id":"CVE-2021-29510","markdown":"https://insights.sbomify.com/CVE-2021-29510/index.md","name":"CVE-2021-29510","record":{"aliases":["DEBIAN-CVE-2021-29510","GHSA-5jqp-qgf6-3pvh","PYSEC-2021-47","UBUNTU-CVE-2021-29510","USN-6553-1","openSUSE-SU-2024:11254-1"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["denial_of_service"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Python data validation library","requires_auth":"none","summary":"Attackers can cause infinite loops and high CPU usage in applications using Pydantic by passing infinity values to date fields.","user_interaction":"required","vuln_class":"denial_of_service"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"fedora","vendor":"fedoraproject"},{"product":"pydantic","vendor":"pydantic"}],"cvss":{"score":3.3,"severity":"low","source":"cna","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L","version":"3.1"},"cwes":[{"id":"CWE-835","name":"Loop with Unreachable Exit Condition"}],"description":"Pydantic is a data validation and settings management using Python type hinting. In affected versions passing either `'infinity'`, `'inf'` or `float('inf')` (or their negatives) to `datetime` or `date` fields causes validation to run forever with 100% CPU usage (on one CPU). Pydantic has been patched with fixes available in the following versions: v1.8.2, v1.7.4, v1.6.2. All these versions are available on pypi(https://pypi.org/project/pydantic/#history), and will be available on conda-forge(https://anaconda.org/conda-forge/pydantic) soon. See the changelog(https://pydantic-docs.helpmanual.io/) for details. If you absolutely can't upgrade, you can work around this risk using a validator(https://pydantic-docs.helpmanual.io/usage/validators/) to catch these values. This is not an ideal solution (in particular you'll need a slightly different function for datetimes), instead of a hack like this you should upgrade pydantic. If you are not using v1.8.x, v1.7.x or v1.6.x and are unable to upgrade to a fixed version of pydantic, please create an issue at https://github.com/samuelcolvin/pydantic/issues requesting a back-port, and we will endeavour to release a patch for earlier versions of pydantic.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Use of \"infinity\" as an input to datetime and date fields causes infinite loop in pydantic","id":"CVE-2021-29510","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":"fedoraproject:fedora","products":["fedoraproject:fedora"],"type":"denial_of_service","year":"2021"},"n_packages":7,"n_references":5,"next":{"headline":"Memory over-allocation in evm crate","id":"CVE-2021-29511"},"packages":[{"ecosystem":"PyPI","fixed":["1.6.2","1.7.4","1.8.2"],"introduced":["0","1.7","1.8"],"last_affected":[],"package":"pydantic","purl":"pkg:pypi/pydantic","source":"PYSEC-2021-47"},{"ecosystem":"PyPI","fixed":["1.6.2"],"introduced":["0"],"last_affected":[],"package":"pydantic","purl":null,"source":"GHSA-5jqp-qgf6-3pvh"},{"ecosystem":"PyPI","fixed":["1.6.2"],"introduced":["0"],"last_affected":[],"package":"pydantic","purl":"pkg:pypi/pydantic","source":"GHSA-5jqp-qgf6-3pvh"},{"ecosystem":"PyPI","fixed":["1.7.4"],"introduced":["1.7"],"last_affected":[],"package":"pydantic","purl":null,"source":"GHSA-5jqp-qgf6-3pvh"},{"ecosystem":"PyPI","fixed":["1.7.4"],"introduced":["1.7"],"last_affected":[],"package":"pydantic","purl":"pkg:pypi/pydantic","source":"GHSA-5jqp-qgf6-3pvh"},{"ecosystem":"PyPI","fixed":["1.8.2"],"introduced":["1.8"],"last_affected":[],"package":"pydantic","purl":null,"source":"GHSA-5jqp-qgf6-3pvh"},{"ecosystem":"PyPI","fixed":["1.8.2"],"introduced":["1.8"],"last_affected":[],"package":"pydantic","purl":"pkg:pypi/pydantic","source":"GHSA-5jqp-qgf6-3pvh"}],"prev":{"headline":"Keepalive Connections Causing Denial Of Service in puma","id":"CVE-2021-29509"},"products":["pydantic"],"published":"2021-05-13","related":[{"cvss_score":9.8,"headline":"PHP-CGI OS Command Injection","id":"CVE-2024-4577","kev_date_added":"2024-06-12","published":"2024-06-09"},{"cvss_score":9.8,"headline":"Grafana Authentication Bypass","id":"CVE-2021-39226","kev_date_added":"2022-08-25","published":"2021-10-05"},{"cvss_score":9.8,"headline":"VMware ESXi and Horizon DaaS OpenSLP Heap-Based Buffer Overflow","id":"CVE-2019-5544","kev_date_added":"2021-11-03","published":"2019-12-06"},{"cvss_score":9.6,"headline":"Google Chromium V8 Type Confusion","id":"CVE-2024-4947","kev_date_added":"2024-05-20","published":"2024-05-15"},{"cvss_score":9.6,"headline":"Google Chromium Visuals Use-After-Free","id":"CVE-2024-4671","kev_date_added":"2024-05-13","published":"2024-05-09"},{"cvss_score":9.6,"headline":"Google Chromium Mojo Insufficient Data Validation","id":"CVE-2022-3075","kev_date_added":"2022-09-08","published":"2022-09-26"},{"cvss_score":9.6,"headline":"Google Chromium Indexed DB API Use-After-Free","id":"CVE-2021-30633","kev_date_added":"2021-11-03","published":"2021-10-08"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-03","vendors":["samuelcolvin"]},"summary":"Attackers can cause infinite loops and high CPU usage in applications using Pydantic by passing infinity values to date fields.","url":"https://insights.sbomify.com/CVE-2021-29510/"}