{"answers":{"affected":"5 open source packages ship an affected version, including nanopb. It affects 1 product.","exploited":"There is no known exploitation of CVE-2020-26243 in the wild and no public exploit code.","fix":"Upgrade nanopb to a fixed version for your release line: 0.3.9.7 or 0.4.4.","what":"CVE-2020-26243 is a high-severity memory corruption vulnerability in nanopb, published on 25 Nov 2020. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2020-26243 and fix it if it is affected.\n\nWhat it is: CVE-2020-26243 is a high-severity memory corruption vulnerability in nanopb, published on 25 Nov 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2020-26243 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- nanopb (PyPI): affected from 0.3.2; fixed in 0.3.9.7, 0.4.4\n- nanopb (PyPI): affected from 0.3.2; fixed in 0.3.9.7\n- nanopb (PyPI): affected from 0.3.2; fixed in 0.3.9.7\n- nanopb (PyPI): affected from 0.4.0; fixed in 0.4.4\n- nanopb (PyPI): affected from 0.4.0; fixed in 0.4.4\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-2020-26243/ (Markdown: https://insights.sbomify.com/CVE-2020-26243/index.md)","id":"CVE-2020-26243","markdown":"https://insights.sbomify.com/CVE-2020-26243/index.md","name":"CVE-2020-26243","record":{"aliases":["DEBIAN-CVE-2020-26243","GHSA-85rr-4rh9-hhwh","PYSEC-2026-684","UBUNTU-CVE-2020-26243"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":true,"product_category":"Protocol Buffers library","requires_auth":"none","summary":"Attackers can cause memory leaks in nanopb by sending crafted messages with specific oneof structures, leading to resource exhaustion.","user_interaction":"not_required","vuln_class":"memory_corruption"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"nanopb","vendor":"nanopb_project"}],"cvss":{"score":7.5,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","version":"3.1"},"cwes":[{"id":"CWE-20","name":"Improper Input Validation"},{"id":"CWE-119","name":"Improper Restriction of Operations within the Bounds of a Memory Buffer"}],"description":"Nanopb is a small code-size Protocol Buffers implementation. In Nanopb before versions 0.4.4 and 0.3.9.7, decoding specifically formed message can leak memory if dynamic allocation is enabled and an oneof field contains a static submessage that contains a dynamic field, and the message being decoded contains the submessage multiple times. This is rare in normal messages, but it is a concern when untrusted data is parsed. This is fixed in versions 0.3.9.7 and 0.4.4. The following workarounds are available: 1) Set the option `no_unions` for the oneof field. This will generate fields as separate instead of C union, and avoids triggering the problematic code. 2) Set the type of the submessage field inside oneof to `FT_POINTER`. This way the whole submessage will be dynamically allocated and the problematic code is not executed. 3) Use an arena allocator for nanopb, to make sure all memory can be released afterwards.","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":"Memory leak in nanopb","id":"CVE-2020-26243","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"memory_corruption","year":"2020"},"n_packages":5,"n_references":4,"next":{"headline":"Cryptographic issues in Python oic","id":"CVE-2020-26244"},"packages":[{"ecosystem":"PyPI","fixed":["0.3.9.7","0.4.4"],"introduced":["0.3.2","0.4.0"],"last_affected":[],"package":"nanopb","purl":"pkg:pypi/nanopb","source":"PYSEC-2026-684"},{"ecosystem":"PyPI","fixed":["0.3.9.7"],"introduced":["0.3.2"],"last_affected":[],"package":"nanopb","purl":null,"source":"GHSA-85rr-4rh9-hhwh"},{"ecosystem":"PyPI","fixed":["0.3.9.7"],"introduced":["0.3.2"],"last_affected":[],"package":"nanopb","purl":"pkg:pypi/nanopb","source":"GHSA-85rr-4rh9-hhwh"},{"ecosystem":"PyPI","fixed":["0.4.4"],"introduced":["0.4.0"],"last_affected":[],"package":"nanopb","purl":null,"source":"GHSA-85rr-4rh9-hhwh"},{"ecosystem":"PyPI","fixed":["0.4.4"],"introduced":["0.4.0"],"last_affected":[],"package":"nanopb","purl":"pkg:pypi/nanopb","source":"GHSA-85rr-4rh9-hhwh"}],"prev":{"headline":"Denial of service in geth","id":"CVE-2020-26242"},"products":["nanopb"],"published":"2020-11-25","related":[{"cvss_score":9.8,"headline":"Integer overflow in n/a","id":"CVE-2014-125106","kev_date_added":null,"published":"2023-06-17"},{"cvss_score":7.1,"headline":"Invalid free() call in Nanopb","id":"CVE-2021-21401","kev_date_added":null,"published":"2021-03-23"},{"cvss_score":6.5,"headline":"Out-of-memory condition in Nanopb is potentially exploitable","id":"CVE-2020-5235","kev_date_added":null,"published":"2020-02-04"}],"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-04","vendors":["nanopb"]},"summary":"Attackers can cause memory leaks in nanopb by sending crafted messages with specific oneof structures, leading to resource exhaustion.","url":"https://insights.sbomify.com/CVE-2020-26243/"}