{"id":"CVE-2022-3509","summary":"Parsing issue in protobuf textformat","details":"A parsing issue similar to CVE-2022-3171, but with textformat in protobuf-java core and lite versions prior to 3.21.7, 3.20.3, 3.19.6 and 3.16.3 can lead to a denial of service attack. Inputs containing multiple instances of non-repeated embedded messages with repeated or unknown fields causes objects to be converted back-n-forth between mutable and immutable forms, resulting in potentially long garbage collection pauses. We recommend updating to the versions mentioned above.","aliases":["GHSA-g5ww-5jh7-63cx"],"modified":"2026-08-12T13:01:14.016224Z","published":"2022-11-01T18:09:31.634Z","related":["CGA-97ch-rm4c-j5hm"],"database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/3xxx/CVE-2022-3509.json","cna_assigner":"Google"},"references":[{"type":"WEB","url":"https://github.com/protocolbuffers/protobuf/"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/3xxx/CVE-2022-3509.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-3509"},{"type":"FIX","url":"https://github.com/protocolbuffers/protobuf/commit/a3888f53317a8018e7a439bac4abeb8f3425d5e9"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/protocolbuffers/protobuf","events":[{"introduced":"2dc747c574b68a808ea4699d26942c8132fe2b09"},{"fixed":"b8c2488f480bbe3d66b9874c2fcd434201caa48a"},{"introduced":"17b30e96476be70b8773b2b807bab857fd3ceb39"},{"fixed":"5cba162a5d93f8df786d828621019e03e50edb4f"},{"introduced":"bc799d78f81115940eec953e2937245c70e3e6e4"},{"fixed":"fe271ab76f2ad2b2b28c10443865d2af21e27e0e"},{"introduced":"7062d0a2d0075d5e7d5c294fd3984df67a976da3"},{"fixed":"54489e95e01882407f356f83c9074415e561db00"},{"introduced":"652d99a8ee8aa6b801e11977951fbf444cfccc8f"},{"fixed":"5cba162a5d93f8df786d828621019e03e50edb4f"},{"fixed":"a3888f53317a8018e7a439bac4abeb8f3425d5e9"}],"database_specific":{"cpe":["cpe:2.3:a:google:protobuf-java:*:*:*:*:*:*:*:*","cpe:2.3:a:google:protobuf-javalite:*:*:*:*:*:*:*:*"],"extracted_events":[{"introduced":"3.16.0"},{"fixed":"3.16.3"},{"introduced":"3.19.0"},{"fixed":"3.19.6"},{"introduced":"3.20.0"},{"fixed":"3.20.3"},{"introduced":"3.21.0"},{"fixed":"3.21.7"},{"introduced":"3.17.0"}],"source":["CPE_RANGE","REFERENCES"]}}],"versions":["v3.20.1","v3.16.1","v3.19.4","v3.20.1-rc1","v3.20.0-rc3","v3.20.0","v3.19.3","v3.19.2","v3.16.0","v3.19.1","v3.19.0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-3509.json","vanir_signatures_modified":"2026-08-12T13:01:14Z","vanir_signatures":[{"target":{"file":"java/core/src/main/java/com/google/protobuf/MessageReflection.java","function":"setRepeatedField"},"deprecated":false,"digest":{"function_hash":"318697962875854436208708012669122412433","length":123},"id":"CVE-2022-3509-030478ad","signature_type":"Function","signature_version":"v1","source":"https://github.com/protocolbuffers/protobuf/commit/a3888f53317a8018e7a439bac4abeb8f3425d5e9"},{"deprecated":false,"digest":{"line_hashes":["193918656306147769068296203112997151048","6970572375270295634229501710764818466","201149464380280767021250280536305292739","62337926865076899714071775286710432310","296080155896247037420948734193509754874","312783912105924166585926194836740912417","206665848151640287072461756110478926878","134242923683445967929707232975613310123","103128170843420442570132474869590360945","242238405261053064765581186784808954345","46654108390669920640471238023669127042","281592648476008420749170335327688208316","298359019402203580427116251849226929313","175573749787805660916533010532526824631","256788251386742963555757874511588672633","81829380176648611711502030493272396690","125138423473154158656787964306132186736","168422573624685437771844466960059856835","205582730866024866912695284934818242153","299793320386440717786528757866081472472","329883888244280459047766267781110712888","153431744025473765851775258758329855604","239592695556665208510997937606608825725","339966612056930735756888654998859627478","237135300609794938838709836771289888422","134506067536714602095614570981204999265","159427072546319791439184474099943229051","57112056823419684556493529620706242959","270892869276369084853595701449944611958","841122943170107706785839455400739452","153431744025473765851775258758329855604","288655223600760864225255123869638308758","256993347251528894690245159060968979056","293774279449923744482253725671338894772","68525599392655188530139012167142037756","313724401178583275325499913596381795607","298465843816814655744385720046331889984","80802495124931110123483057488607980159","53819579933401984844547967031707027969","57107651129895131168543634072733397594","59330483109711670649983664882638590008","286895868257121200355855011699385167633","197235136617013825844166980978605548146","286703744833984434282966399840751104318","85133470093451805155152531364529862038","188878584126251438691907094279128459521","51107582945267963525868324337614006510","97970852876185168010845494884684771108","150226529767874866336591602088894942690","152480524157446285331092305350586951328"],"threshold":0.9},"id":"CVE-2022-3509-1667a429","signature_type":"Line","signature_version":"v1","source":"https://github.com/protocolbuffers/protobuf/commit/a3888f53317a8018e7a439bac4abeb8f3425d5e9","target":{"file":"java/core/src/main/java/com/google/protobuf/MessageReflection.java"}},{"id":"CVE-2022-3509-188035fa","signature_type":"Line","signature_version":"v1","source":"https://github.com/protocolbuffers/protobuf/commit/5cba162a5d93f8df786d828621019e03e50edb4f","target":{"file":"src/google/protobuf/compiler/plugin.pb.h"},"deprecated":false,"digest":{"line_hashes":["99802369379779068741640024407784092008","225304807984448079980401650582696715752","252831113805316861556574171429044010978","224179326576241034740376008476800918793"],"threshold":0.9}},{"id":"CVE-2022-3509-1a4951d1","signature_type":"Line","signature_version":"v1","source":"https://github.com/protocolbuffers/protobuf/commit/5cba162a5d93f8df786d828621019e03e50edb4f","target":{"file":"src/google/protobuf/descriptor.pb.h"},"deprecated":false,"digest":{"line_hashes":["99802369379779068741640024407784092008","225304807984448079980401650582696715752","252831113805316861556574171429044010978","224179326576241034740376008476800918793"],"threshold":0.9}},{"signature_type":"Line","signature_version":"v1","source":"https://github.com/protocolbuffers/protobuf/commit/5cba162a5d93f8df786d828621019e03e50edb4f","target":{"file":"src/google/protobuf/wrappers.pb.h"},"deprecated":false,"digest":{"line_hashes":["99802369379779068741640024407784092008","225304807984448079980401650582696715752","252831113805316861556574171429044010978","224179326576241034740376008476800918793"],"threshold":0.9},"id":"CVE-2022-3509-2069b3da"},{"target":{"file":"java/core/src/main/java/com/google/protobuf/MessageReflection.java","function":"newMergeTargetForField"},"deprecated":false,"digest":{"function_hash":"302126851928630386882528743161431815498","length":315},"id":"CVE-2022-3509-2f3c869c","signature_type":"Function","signature_version":"v1","source":"https://github.com/protocolbuffers/protobuf/commit/a3888f53317a8018e7a439bac4abeb8f3425d5e9"},{"signature_type":"Line","signature_version":"v1","source":"https://github.com/protocolbuffers/protobuf/commit/5cba162a5d93f8df786d828621019e03e50edb4f","target":{"file":"src/google/protobuf/any.pb.h"},"deprecated":false,"digest":{"line_hashes":["99802369379779068741640024407784092008","225304807984448079980401650582696715752","252831113805316861556574171429044010978","224179326576241034740376008476800918793"],"threshold":0.9},"id":"CVE-2022-3509-2f6d50fa"},{"deprecated":false,"digest":{"line_hashes":["14463844651962961940331438795809373578","214516298593296203942852467115320028386","261809066153928994664321823254706116376","307626444442344817117879599035219910274"],"threshold":0.9},"id":"CVE-2022-3509-3c760779","signature_type":"Line","signature_version":"v1","source":"https://github.com/protocolbuffers/protobuf/commit/b8c2488f480bbe3d66b9874c2fcd434201caa48a","target":{"file":"src/google/protobuf/wrappers.pb.h"}},{"deprecated":false,"digest":{"length":497,"function_hash":"89565842956687219677816611402073178904"},"id":"CVE-2022-3509-4ae20b8a","signature_type":"Function","signature_version":"v1","source":"https://github.com/protocolbuffers/protobuf/commit/a3888f53317a8018e7a439bac4abeb8f3425d5e9","target":{"file":"java/core/src/main/java/com/google/protobuf/MessageReflection.java","function":"mergeMessage"}},{"signature_version":"v1","source":"https://github.com/protocolbuffers/protobuf/commit/5cba162a5d93f8df786d828621019e03e50edb4f","target":{"file":"src/google/protobuf/field_mask.pb.h"},"deprecated":false,"digest":{"line_hashes":["99802369379779068741640024407784092008","225304807984448079980401650582696715752","252831113805316861556574171429044010978","224179326576241034740376008476800918793"],"threshold":0.9},"id":"CVE-2022-3509-4e70c1e4","signature_type":"Line"},{"signature_type":"Line","signature_version":"v1","source":"https://github.com/protocolbuffers/protobuf/commit/b8c2488f480bbe3d66b9874c2fcd434201caa48a","target":{"file":"src/google/protobuf/descriptor.pb.h"},"deprecated":false,"digest":{"line_hashes":["14463844651962961940331438795809373578","214516298593296203942852467115320028386","261809066153928994664321823254706116376","307626444442344817117879599035219910274"],"threshold":0.9},"id":"CVE-2022-3509-51960048"},{"signature_type":"Line","signature_version":"v1","source":"https://github.com/protocolbuffers/protobuf/commit/b8c2488f480bbe3d66b9874c2fcd434201caa48a","target":{"file":"src/google/protobuf/timestamp.pb.h"},"deprecated":false,"digest":{"line_hashes":["14463844651962961940331438795809373578","214516298593296203942852467115320028386","261809066153928994664321823254706116376","307626444442344817117879599035219910274"],"threshold":0.9},"id":"CVE-2022-3509-610f4e97"},{"signature_version":"v1","source":"https://github.com/protocolbuffers/protobuf/commit/b8c2488f480bbe3d66b9874c2fcd434201caa48a","target":{"file":"src/google/protobuf/api.pb.h"},"deprecated":false,"digest":{"line_hashes":["14463844651962961940331438795809373578","214516298593296203942852467115320028386","261809066153928994664321823254706116376","307626444442344817117879599035219910274"],"threshold":0.9},"id":"CVE-2022-3509-6bc36508","signature_type":"Line"},{"signature_type":"Line","signature_version":"v1","source":"https://github.com/protocolbuffers/protobuf/commit/b8c2488f480bbe3d66b9874c2fcd434201caa48a","target":{"file":"src/google/protobuf/compiler/plugin.pb.h"},"deprecated":false,"digest":{"line_hashes":["14463844651962961940331438795809373578","214516298593296203942852467115320028386","261809066153928994664321823254706116376","307626444442344817117879599035219910274"],"threshold":0.9},"id":"CVE-2022-3509-7b523458"},{"id":"CVE-2022-3509-7b59bb12","signature_type":"Line","signature_version":"v1","source":"https://github.com/protocolbuffers/protobuf/commit/5cba162a5d93f8df786d828621019e03e50edb4f","target":{"file":"src/google/protobuf/timestamp.pb.h"},"deprecated":false,"digest":{"line_hashes":["99802369379779068741640024407784092008","225304807984448079980401650582696715752","252831113805316861556574171429044010978","224179326576241034740376008476800918793"],"threshold":0.9}},{"digest":{"line_hashes":["14463844651962961940331438795809373578","214516298593296203942852467115320028386","261809066153928994664321823254706116376","307626444442344817117879599035219910274"],"threshold":0.9},"id":"CVE-2022-3509-892436e4","signature_type":"Line","signature_version":"v1","source":"https://github.com/protocolbuffers/protobuf/commit/b8c2488f480bbe3d66b9874c2fcd434201caa48a","target":{"file":"src/google/protobuf/type.pb.h"},"deprecated":false},{"deprecated":false,"digest":{"line_hashes":["14463844651962961940331438795809373578","214516298593296203942852467115320028386","261809066153928994664321823254706116376","307626444442344817117879599035219910274"],"threshold":0.9},"id":"CVE-2022-3509-8c2e0192","signature_type":"Line","signature_version":"v1","source":"https://github.com/protocolbuffers/protobuf/commit/b8c2488f480bbe3d66b9874c2fcd434201caa48a","target":{"file":"src/google/protobuf/any.pb.h"}},{"signature_type":"Line","signature_version":"v1","source":"https://github.com/protocolbuffers/protobuf/commit/5cba162a5d93f8df786d828621019e03e50edb4f","target":{"file":"src/google/protobuf/api.pb.h"},"deprecated":false,"digest":{"line_hashes":["99802369379779068741640024407784092008","225304807984448079980401650582696715752","252831113805316861556574171429044010978","224179326576241034740376008476800918793"],"threshold":0.9},"id":"CVE-2022-3509-8ec1c149"},{"deprecated":false,"digest":{"length":54,"function_hash":"7011404373501007875542615164595219252"},"id":"CVE-2022-3509-976785e1","signature_type":"Function","signature_version":"v1","source":"https://github.com/protocolbuffers/protobuf/commit/a3888f53317a8018e7a439bac4abeb8f3425d5e9","target":{"file":"java/core/src/main/java/com/google/protobuf/MessageReflection.java","function":"finish"}},{"deprecated":false,"digest":{"line_hashes":["99802369379779068741640024407784092008","225304807984448079980401650582696715752","252831113805316861556574171429044010978","224179326576241034740376008476800918793"],"threshold":0.9},"id":"CVE-2022-3509-97dee356","signature_type":"Line","signature_version":"v1","source":"https://github.com/protocolbuffers/protobuf/commit/5cba162a5d93f8df786d828621019e03e50edb4f","target":{"file":"src/google/protobuf/empty.pb.h"}},{"deprecated":false,"digest":{"line_hashes":["99802369379779068741640024407784092008","225304807984448079980401650582696715752","252831113805316861556574171429044010978","224179326576241034740376008476800918793"],"threshold":0.9},"id":"CVE-2022-3509-9c5325d9","signature_type":"Line","signature_version":"v1","source":"https://github.com/protocolbuffers/protobuf/commit/5cba162a5d93f8df786d828621019e03e50edb4f","target":{"file":"src/google/protobuf/type.pb.h"}},{"source":"https://github.com/protocolbuffers/protobuf/commit/b8c2488f480bbe3d66b9874c2fcd434201caa48a","target":{"file":"src/google/protobuf/empty.pb.h"},"deprecated":false,"digest":{"line_hashes":["14463844651962961940331438795809373578","214516298593296203942852467115320028386","261809066153928994664321823254706116376","307626444442344817117879599035219910274"],"threshold":0.9},"id":"CVE-2022-3509-b0f21209","signature_type":"Line","signature_version":"v1"},{"digest":{"line_hashes":["14463844651962961940331438795809373578","214516298593296203942852467115320028386","261809066153928994664321823254706116376","307626444442344817117879599035219910274"],"threshold":0.9},"id":"CVE-2022-3509-c1227f64","signature_type":"Line","signature_version":"v1","source":"https://github.com/protocolbuffers/protobuf/commit/b8c2488f480bbe3d66b9874c2fcd434201caa48a","target":{"file":"src/google/protobuf/duration.pb.h"},"deprecated":false},{"signature_version":"v1","source":"https://github.com/protocolbuffers/protobuf/commit/a3888f53317a8018e7a439bac4abeb8f3425d5e9","target":{"file":"java/core/src/main/java/com/google/protobuf/MessageReflection.java","function":"setField"},"deprecated":false,"digest":{"function_hash":"216832926185987137026719828843800808099","length":101},"id":"CVE-2022-3509-c872660b","signature_type":"Function"},{"digest":{"line_hashes":["99802369379779068741640024407784092008","225304807984448079980401650582696715752","252831113805316861556574171429044010978","224179326576241034740376008476800918793"],"threshold":0.9},"id":"CVE-2022-3509-c9c7f1ec","signature_type":"Line","signature_version":"v1","source":"https://github.com/protocolbuffers/protobuf/commit/5cba162a5d93f8df786d828621019e03e50edb4f","target":{"file":"src/google/protobuf/duration.pb.h"},"deprecated":false},{"target":{"file":"java/core/src/main/java/com/google/protobuf/MessageReflection.java","function":"mergeGroup"},"deprecated":false,"digest":{"function_hash":"30533295113327599854847425549054277276","length":566},"id":"CVE-2022-3509-d0a0df97","signature_type":"Function","signature_version":"v1","source":"https://github.com/protocolbuffers/protobuf/commit/a3888f53317a8018e7a439bac4abeb8f3425d5e9"},{"target":{"file":"src/google/protobuf/field_mask.pb.h"},"deprecated":false,"digest":{"line_hashes":["14463844651962961940331438795809373578","214516298593296203942852467115320028386","261809066153928994664321823254706116376","307626444442344817117879599035219910274"],"threshold":0.9},"id":"CVE-2022-3509-d5e132eb","signature_type":"Line","signature_version":"v1","source":"https://github.com/protocolbuffers/protobuf/commit/b8c2488f480bbe3d66b9874c2fcd434201caa48a"},{"deprecated":false,"digest":{"line_hashes":["14463844651962961940331438795809373578","214516298593296203942852467115320028386","261809066153928994664321823254706116376","307626444442344817117879599035219910274"],"threshold":0.9},"id":"CVE-2022-3509-ebeb0e90","signature_type":"Line","signature_version":"v1","source":"https://github.com/protocolbuffers/protobuf/commit/b8c2488f480bbe3d66b9874c2fcd434201caa48a","target":{"file":"src/google/protobuf/source_context.pb.h"}},{"signature_type":"Function","signature_version":"v1","source":"https://github.com/protocolbuffers/protobuf/commit/a3888f53317a8018e7a439bac4abeb8f3425d5e9","target":{"file":"java/core/src/main/java/com/google/protobuf/MessageReflection.java","function":"addRepeatedField"},"deprecated":false,"digest":{"function_hash":"216832926185987137026719828843800808099","length":101},"id":"CVE-2022-3509-f0d07710"},{"deprecated":false,"digest":{"line_hashes":["99802369379779068741640024407784092008","225304807984448079980401650582696715752","252831113805316861556574171429044010978","224179326576241034740376008476800918793"],"threshold":0.9},"id":"CVE-2022-3509-f9310ee7","signature_type":"Line","signature_version":"v1","source":"https://github.com/protocolbuffers/protobuf/commit/5cba162a5d93f8df786d828621019e03e50edb4f","target":{"file":"src/google/protobuf/struct.pb.h"}},{"digest":{"line_hashes":["99802369379779068741640024407784092008","225304807984448079980401650582696715752","252831113805316861556574171429044010978","224179326576241034740376008476800918793"],"threshold":0.9},"id":"CVE-2022-3509-f931a154","signature_type":"Line","signature_version":"v1","source":"https://github.com/protocolbuffers/protobuf/commit/5cba162a5d93f8df786d828621019e03e50edb4f","target":{"file":"src/google/protobuf/source_context.pb.h"},"deprecated":false},{"target":{"file":"src/google/protobuf/struct.pb.h"},"deprecated":false,"digest":{"threshold":0.9,"line_hashes":["14463844651962961940331438795809373578","214516298593296203942852467115320028386","261809066153928994664321823254706116376","307626444442344817117879599035219910274"]},"id":"CVE-2022-3509-fd9bc12e","signature_type":"Line","signature_version":"v1","source":"https://github.com/protocolbuffers/protobuf/commit/b8c2488f480bbe3d66b9874c2fcd434201caa48a"}]}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"}]}