{"api_version":"1","generated_at":"2026-04-23T06:44:25+00:00","cve":"CVE-2020-26243","urls":{"html":"https://cve.report/CVE-2020-26243","api":"https://cve.report/api/cve/CVE-2020-26243.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2020-26243","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2020-26243"},"summary":{"title":"CVE-2020-26243","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.","state":"PUBLIC","assigner":"security-advisories@github.com","published_at":"2020-11-25 17:15:00","updated_at":"2020-12-07 20:49:00"},"problem_types":["CWE-119","CWE-20"],"metrics":[],"references":[{"url":"https://github.com/nanopb/nanopb/issues/615","name":"https://github.com/nanopb/nanopb/issues/615","refsource":"MISC","tags":["Exploit","Patch","Third Party Advisory"],"title":"Memory leak when parsing a protobuf message with duplicate fields · Issue #615 · nanopb/nanopb · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://github.com/nanopb/nanopb/commit/4fe23595732b6f1254cfc11a9b8d6da900b55b0c","name":"https://github.com/nanopb/nanopb/commit/4fe23595732b6f1254cfc11a9b8d6da900b55b0c","refsource":"MISC","tags":["Patch","Third Party Advisory"],"title":"Fix memory leak with oneofs and PB_ENABLE_MALLOC (#615) · nanopb/nanopb@4fe2359 · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://github.com/nanopb/nanopb/security/advisories/GHSA-85rr-4rh9-hhwh","name":"https://github.com/nanopb/nanopb/security/advisories/GHSA-85rr-4rh9-hhwh","refsource":"CONFIRM","tags":["Third Party Advisory"],"title":"Oneof fields with PB_ENABLE_MALLOC can leak memory · Advisory · nanopb/nanopb · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"0"},{"url":"https://github.com/nanopb/nanopb/blob/2b48a361786dfb1f63d229840217a93aae064667/CHANGELOG.txt","name":"https://github.com/nanopb/nanopb/blob/2b48a361786dfb1f63d229840217a93aae064667/CHANGELOG.txt","refsource":"MISC","tags":["Release Notes","Third Party Advisory"],"title":"nanopb/CHANGELOG.txt at 2b48a361786dfb1f63d229840217a93aae064667 · nanopb/nanopb · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://www.cve.org/CVERecord?id=CVE-2020-26243","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-26243","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2020","cve_id":"26243","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"nanopb_project","cpe5":"nanopb","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2020","cve_id":"26243","vulnerable":"1","versionEndIncluding":"1","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"nanopb_project","cpe5":"nanopb","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[{"cve":"CVE-2020-26243","qid":"199489","title":"Ubuntu Security Notification for Nanopb Vulnerabilities (USN-6121-1)"},{"cve":"CVE-2020-26243","qid":"983222","title":"Python (pip) Security Update for nanopb (GHSA-85rr-4rh9-hhwh)"}]},"source_records":{"cve_program":{"CVE_data_meta":{"ASSIGNER":"security-advisories@github.com","ID":"CVE-2020-26243","STATE":"PUBLIC","TITLE":"Memory leak in nanopb"},"affects":{"vendor":{"vendor_data":[{"product":{"product_data":[{"product_name":"nanopb","version":{"version_data":[{"version_value":"< 0.3.9.7"},{"version_value":">= 0.4.0, < 0.4.4"}]}}]},"vendor_name":"nanopb"}]}},"data_format":"MITRE","data_type":"CVE","data_version":"4.0","description":{"description_data":[{"lang":"eng","value":"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."}]},"impact":{"cvss":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"HIGH","baseScore":7.5,"baseSeverity":"HIGH","confidentialityImpact":"NONE","integrityImpact":"NONE","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","version":"3.1"}},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"CWE-20: Improper Input Validation"}]},{"description":[{"lang":"eng","value":"CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer"}]}]},"references":{"reference_data":[{"name":"https://github.com/nanopb/nanopb/security/advisories/GHSA-85rr-4rh9-hhwh","refsource":"CONFIRM","url":"https://github.com/nanopb/nanopb/security/advisories/GHSA-85rr-4rh9-hhwh"},{"name":"https://github.com/nanopb/nanopb/issues/615","refsource":"MISC","url":"https://github.com/nanopb/nanopb/issues/615"},{"name":"https://github.com/nanopb/nanopb/commit/4fe23595732b6f1254cfc11a9b8d6da900b55b0c","refsource":"MISC","url":"https://github.com/nanopb/nanopb/commit/4fe23595732b6f1254cfc11a9b8d6da900b55b0c"},{"name":"https://github.com/nanopb/nanopb/blob/2b48a361786dfb1f63d229840217a93aae064667/CHANGELOG.txt","refsource":"MISC","url":"https://github.com/nanopb/nanopb/blob/2b48a361786dfb1f63d229840217a93aae064667/CHANGELOG.txt"}]},"source":{"advisory":"GHSA-85rr-4rh9-hhwh","discovery":"UNKNOWN"}},"nvd":{"publishedDate":"2020-11-25 17:15:00","lastModifiedDate":"2020-12-07 20:49:00","problem_types":["CWE-119","CWE-20"],"metrics":{"baseMetricV3":{"cvssV3":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"NONE","availabilityImpact":"HIGH","baseScore":7.5,"baseSeverity":"HIGH"},"exploitabilityScore":3.9,"impactScore":3.6},"baseMetricV2":{"cvssV2":{"version":"2.0","vectorString":"AV:N/AC:M/Au:N/C:N/I:N/A:P","accessVector":"NETWORK","accessComplexity":"MEDIUM","authentication":"NONE","confidentialityImpact":"NONE","integrityImpact":"NONE","availabilityImpact":"PARTIAL","baseScore":4.3},"severity":"MEDIUM","exploitabilityScore":8.6,"impactScore":2.9,"acInsufInfo":false,"obtainAllPrivilege":false,"obtainUserPrivilege":false,"obtainOtherPrivilege":false,"userInteractionRequired":false}},"configurations":{"CVE_data_version":"4.0","nodes":[{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:nanopb_project:nanopb:*:*:*:*:*:*:*:*","versionStartIncluding":"0.4.0","versionEndExcluding":"0.4.4","cpe_name":[]},{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:nanopb_project:nanopb:*:*:*:*:*:*:*:*","versionEndExcluding":"0.3.9.7","cpe_name":[]}]}]}},"legacy_mitre":{"record":{"CveYear":"2020","CveId":"26243","Ordinal":"187665","Title":"CVE-2020-26243","CVE":"CVE-2020-26243","Year":"2020"},"notes":[{"CveYear":"2020","CveId":"26243","Ordinal":"1","NoteData":"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.","Type":"Description","Title":null},{"CveYear":"2020","CveId":"26243","Ordinal":"2","NoteData":"2020-11-25","Type":"Other","Title":"Published"},{"CveYear":"2020","CveId":"26243","Ordinal":"3","NoteData":"2020-11-25","Type":"Other","Title":"Modified"}]}}}