{"id":"CVE-2021-43860","details":"Flatpak is a Linux application sandboxing and distribution framework. Prior to versions 1.12.3 and 1.10.6, Flatpak doesn't properly validate that the permissions displayed to the user for an app at install time match the actual permissions granted to the app at runtime, in the case that there's a null byte in the metadata file of an app. Therefore apps can grant themselves permissions without the consent of the user. Flatpak shows permissions to the user during install by reading them from the \"xa.metadata\" key in the commit metadata. This cannot contain a null terminator, because it is an untrusted GVariant. Flatpak compares these permissions to the *actual* metadata, from the \"metadata\" file to ensure it wasn't lied to. However, the actual metadata contents are loaded in several places where they are read as simple C-style strings. That means that, if the metadata file includes a null terminator, only the content of the file from *before* the terminator gets compared to xa.metadata. Thus, any permissions that appear in the metadata file after a null terminator are applied at runtime but not shown to the user. So maliciously crafted apps can give themselves hidden permissions. Users who have Flatpaks installed from untrusted sources are at risk in case the Flatpak has a maliciously crafted metadata file, either initially or in an update. This issue is patched in versions 1.12.3 and 1.10.6. As a workaround, users can manually check the permissions of installed apps by checking the metadata file or the xa.metadata key on the commit metadata.","aliases":["GHSA-qpjc-vq3c-572j"],"modified":"2026-10-20T14:32:30.012791875Z","published":"2022-01-12T22:15:07.977Z","related":["ALSA-2022:1792","SUSE-SU-2022:0712-1","SUSE-SU-2022:3284-1","openSUSE-SU-2022:0712-1","openSUSE-SU-2024:11740-1"],"database_specific":{"unresolved_ranges":[{"cpes":["cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*","cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*","cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*"],"extracted_events":[{"range":[{"introduced":"9.0"},{"last_affected":"9.0"},{"introduced":"10.0"},{"last_affected":"10.0"},{"introduced":"11.0"},{"last_affected":"11.0"}],"source":"CPE_STRING"}],"vendor_product":"debian:debian_linux"},{"vendor_product":"fedoraproject:fedora","cpes":["cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*"],"extracted_events":[{"source":"CPE_STRING","range":[{"introduced":"35"},{"last_affected":"35"}]}]},{"cpes":["cpe:2.3:o:redhat:enterprise_linux:8.0:*:*:*:*:*:*:*"],"extracted_events":[{"range":[{"introduced":"8.0"},{"last_affected":"8.0"}],"source":"CPE_STRING"}],"vendor_product":"redhat:enterprise_linux"}]},"references":[{"type":"WEB","url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/APFTBYGJJVJPFVHRXUW5PII5XOAFI4KH/"},{"type":"ADVISORY","url":"https://github.com/flatpak/flatpak/releases/tag/1.10.6"},{"type":"ADVISORY","url":"https://github.com/flatpak/flatpak/releases/tag/1.12.3"},{"type":"ADVISORY","url":"https://security.gentoo.org/glsa/202312-12"},{"type":"ADVISORY","url":"https://www.debian.org/security/2022/dsa-5049"},{"type":"FIX","url":"https://github.com/flatpak/flatpak/commit/54ec1a482dfc668127eaae57f135e6a8e0bc52da"},{"type":"FIX","url":"https://github.com/flatpak/flatpak/commit/65cbfac982cb1c83993a9e19aa424daee8e9f042"},{"type":"FIX","url":"https://github.com/flatpak/flatpak/commit/93357d357119093804df05acc32ff335839c6451"},{"type":"FIX","url":"https://github.com/flatpak/flatpak/commit/ba818f504c926baaf6e362be8159cfacf994310e"},{"type":"FIX","url":"https://github.com/flatpak/flatpak/commit/d9a8f9d8ccc0b7c1135d0ecde006a75d25f66aee"},{"type":"FIX","url":"https://github.com/flatpak/flatpak/security/advisories/GHSA-qpjc-vq3c-572j"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/flatpak/flatpak","events":[{"introduced":"0"},{"fixed":"17cc9937cad5a10fdbb5dbac1febcc98a10b8d0c"},{"introduced":"bcdc073041e0c93e15aa108b94cb7a39a79dcdf3"},{"last_affected":"e528dcf196816de5e267d08456d1edd6877f8f73"},{"fixed":"54ec1a482dfc668127eaae57f135e6a8e0bc52da"},{"fixed":"65cbfac982cb1c83993a9e19aa424daee8e9f042"},{"fixed":"93357d357119093804df05acc32ff335839c6451"},{"fixed":"ba818f504c926baaf6e362be8159cfacf994310e"},{"fixed":"d9a8f9d8ccc0b7c1135d0ecde006a75d25f66aee"},{"fixed":"e528dcf196816de5e267d08456d1edd6877f8f73"}],"database_specific":{"extracted_events":[{"source":"CPE_RANGE","cpe":"cpe:2.3:a:flatpak:flatpak:*:*:*:*:*:*:*:*","range":[{"introduced":"0"},{"fixed":"1.10.6"}]},{"range":[{"introduced":"1.11.1"},{"last_affected":"1.12.3"}],"source":"CPE_RANGE","cpe":"cpe:2.3:a:flatpak:flatpak:*:*:*:*:*:*:*:*"},{"range":[{"fixed":"54ec1a482dfc668127eaae57f135e6a8e0bc52da"}],"source":"REFERENCES_COMMIT"},{"range":[{"fixed":"65cbfac982cb1c83993a9e19aa424daee8e9f042"}],"source":"REFERENCES_COMMIT"},{"source":"REFERENCES_COMMIT","range":[{"fixed":"93357d357119093804df05acc32ff335839c6451"}]},{"range":[{"fixed":"ba818f504c926baaf6e362be8159cfacf994310e"}],"source":"REFERENCES_COMMIT"},{"source":"REFERENCES_COMMIT","range":[{"fixed":"d9a8f9d8ccc0b7c1135d0ecde006a75d25f66aee"}]},{"range":[{"fixed":"17cc9937cad5a10fdbb5dbac1febcc98a10b8d0c"}],"source":"REFERENCES_TAG","original_tag":"1.10.6"},{"range":[{"fixed":"e528dcf196816de5e267d08456d1edd6877f8f73"}],"source":"REFERENCES_TAG","original_tag":"1.12.3"}]}}],"versions":["1.12.2","1.11.2","1.10.5","1.12.1","1.10.4","1.12.0","1.10.3","1.11.3","1.11.1","1.10.2","1.10.1","1.10.0","1.9.3","1.9.2","1.9.1","1.8.0","1.7.3","1.7.2","1.7.1","1.6.2","1.6.1","1.6.0","1.5.2","1.5.1","1.5.0","1.4.0","1.3.4","1.3.3","1.3.2","1.3.1","1.3.0","1.2.1","1.2.0","1.1.3","1.1.2","1.1.1","1.1.0","1.0.3","1.0.2","1.0.1","1.0.0","0.99.3","0.99.2","0.99.1","0.11.8.3","0.11.8.2","0.11.8.1","0.11.8","0.11.7","0.11.6","0.11.5","0.11.4","0.11.3","0.11.2","0.11.1","0.10.2","0.10.1","0.10.0","0.9.99","0.9.98.2","0.9.98.1","0.9.98","0.9.12","0.9.11","0.9.10","0.9.9","0.9.8","0.9.7","0.9.6","0.9.5","0.9.4","0.9.3","0.9.2","0.9.1","0.8.1","0.8.0","0.6.14","0.6.13","0.6.12","0.6.11","0.6.10","0.6.9","0.6.8","0.6.7","0.6.6","0.6.5","0.6.4","0.6.3","0.6.2","0.6.1","0.6.0","0.5.2","0.5.1","0.5.0","0.4.13","0.4.12","0.4.11","0.4.10","0.4.9","0.4.8","0.4.7","0.4.6","0.4.5","0.4.4","0.4.3","0.4.2.1","0.4.2","0.4.1","0.4.0","0.3.6","0.3.5","0.3.4","0.3.3","0.3.2","0.3.1","0.3","0.2.1","0.2","0.1"],"database_specific":{"vanir_signatures":[{"signature_version":"v1","source":"https://github.com/flatpak/flatpak/commit/ba818f504c926baaf6e362be8159cfacf994310e","target":{"file":"common/flatpak-dir.c","function":"upgrade_deploy_data"},"deprecated":false,"digest":{"function_hash":"339737247405246731989476675945704742036","length":2046},"id":"CVE-2021-43860-3eb1334a","signature_type":"Function"},{"signature_type":"Function","signature_version":"v1","source":"https://github.com/flatpak/flatpak/commit/ba818f504c926baaf6e362be8159cfacf994310e","target":{"file":"common/flatpak-dir.c","function":"flatpak_dir_pull"},"deprecated":false,"digest":{"function_hash":"108157274676217845558974616427300781636","length":3261},"id":"CVE-2021-43860-5594e418"},{"target":{"file":"common/flatpak-dir.c","function":"validate_commit_metadata"},"deprecated":false,"digest":{"function_hash":"201869370587402139055417088224536499509","length":588},"id":"CVE-2021-43860-5ca9d5b1","signature_type":"Function","signature_version":"v1","source":"https://github.com/flatpak/flatpak/commit/ba818f504c926baaf6e362be8159cfacf994310e"},{"deprecated":false,"digest":{"line_hashes":["124588171243196159017325245423169724344","297426710713466060605088962606546847769","165934389046901228074990493218186080362","114060730018427728106657663031172015011","23142527110121917314341611571392501718","62518153213670252093757051117906746599","49410270569780855872032560277951466771","298771084599194939213039736243316336751","68015049258757301742784802346844661454","69272348257012032869529327589425445737","142365861560506242528150096585612340899","126370255795860806015291009246548187126","251641431207220062934404017557492285965","42223758317497889650179176523099628456"],"threshold":0.9},"id":"CVE-2021-43860-7367118b","signature_type":"Line","signature_version":"v1","source":"https://github.com/flatpak/flatpak/commit/ba818f504c926baaf6e362be8159cfacf994310e","target":{"file":"common/flatpak-utils.c"}},{"signature_type":"Function","signature_version":"v1","source":"https://github.com/flatpak/flatpak/commit/ba818f504c926baaf6e362be8159cfacf994310e","target":{"file":"common/flatpak-transaction.c","function":"try_resolve_op_from_metadata"},"deprecated":false,"digest":{"length":1323,"function_hash":"233027807320338073607589774600227767042"},"id":"CVE-2021-43860-77ff53a6"},{"signature_version":"v1","source":"https://github.com/flatpak/flatpak/commit/ba818f504c926baaf6e362be8159cfacf994310e","target":{"file":"common/flatpak-utils.c","function":"flatpak_pull_from_bundle"},"deprecated":false,"digest":{"function_hash":"130268887356355324802151301214002533830","length":2410},"id":"CVE-2021-43860-a16dbd17","signature_type":"Function"},{"digest":{"length":1017,"function_hash":"35507444413538165187572202229198735844"},"id":"CVE-2021-43860-b3e431be","signature_type":"Function","signature_version":"v1","source":"https://github.com/flatpak/flatpak/commit/ba818f504c926baaf6e362be8159cfacf994310e","target":{"file":"common/flatpak-transaction.c","function":"resolve_op_from_commit"},"deprecated":false},{"deprecated":false,"digest":{"threshold":0.9,"line_hashes":["100737419827060205170198414800389184387","147773516081525001554295588253374388184","226225098825430752395285439407341201299","303147884397468597738662709471431570791","241641131146341495441644568526422954398","88043545392854206544277765936902990586","59500614890680722908205740340948755221","168256884569841067884185050026736665062","259357256558738351504726465500188503747","181138335075233938374465241475198759983","127017229258498961023957720820318952800","28042782009037569120671434122320668804","231012024652166073477797178561391339267","6489037587716790811367711182929614153","313828336662594673455220358967849379802","145946474572252029719996614458748132423","105378569069162234850768369549942688277","183321967984024006210163039148144222295","316107473565103082443988270586501569191","98223543383625866905502946294220025283","78003675036132145024940266323136981023","159828783754817344216548204969522165493","83960354187234932446953270250865777970","105443273874021836890860840303759115755","181224744156650566400872879786794734155","81887701916145403750761171648458072429","70032870353621431751052726394536128812","28494434730770681077016801247642358209","243157794437306587665422466713735513865","252828546703910787814860840973790694651","314445975014033486486876501564521805295","214481218969469092082669095116137988979","338412271555581422031928028987357398958","226218761533293436320315337539252089534","187733715585570057798640888719938202345","82629542228865644247658191515657695735","59509183817093369878375538042218526829","257878910756238708787772132690214606659","252140756641509854650757499695224544643","100899753757084331058382048621250040764","25506175481870640167739428453839082526","284763049928881514111373346329127519135","179660368344375117315951300530965121794","56925722711802919112719619249771525804","80891711527026972231675690018738210259"]},"id":"CVE-2021-43860-bc88dfd3","signature_type":"Line","signature_version":"v1","source":"https://github.com/flatpak/flatpak/commit/ba818f504c926baaf6e362be8159cfacf994310e","target":{"file":"common/flatpak-dir.c"}},{"target":{"function":"load_deployed_metadata","file":"common/flatpak-transaction.c"},"deprecated":false,"digest":{"function_hash":"5925686855147228042481882271521756390","length":969},"id":"CVE-2021-43860-ccdc3492","signature_type":"Function","signature_version":"v1","source":"https://github.com/flatpak/flatpak/commit/ba818f504c926baaf6e362be8159cfacf994310e"},{"id":"CVE-2021-43860-e4782c3e","signature_type":"Function","signature_version":"v1","source":"https://github.com/flatpak/flatpak/commit/ba818f504c926baaf6e362be8159cfacf994310e","target":{"file":"common/flatpak-transaction.c","function":"flatpak_transaction_add_ref"},"deprecated":false,"digest":{"length":2672,"function_hash":"2696867275489056180011282615357340171"}},{"id":"CVE-2021-43860-ef0a0517","signature_type":"Line","signature_version":"v1","source":"https://github.com/flatpak/flatpak/commit/ba818f504c926baaf6e362be8159cfacf994310e","target":{"file":"common/flatpak-transaction.c"},"deprecated":false,"digest":{"line_hashes":["210648484732517088296769330734129106940","46629451896094101670571230274217458358","162445486178380282586568069834911329075","111740388813201847549500563602858560156","150481912879845550593135711365509310769","256193446523528562998242946403058041632","235817528180193076402361451869924316677","208198275019053322225600353267922397967","248933591574767209822627382570382408461","290473216411275696532154990853373061300","13497216911047613904274732569591815499","182487748692728740097300994311861168371","311053415847645923945277703357330979141","298409011616285831933306185866212696719","124492121589322149192915062175388484543","50843910737737449487675448893836490152"],"threshold":0.9}},{"source":"https://github.com/flatpak/flatpak/commit/ba818f504c926baaf6e362be8159cfacf994310e","target":{"file":"common/flatpak-dir.c","function":"flatpak_dir_deploy"},"deprecated":false,"digest":{"length":9504,"function_hash":"344809701562139156707791863798175169"},"id":"CVE-2021-43860-f076299d","signature_type":"Function","signature_version":"v1"}],"vanir_signatures_modified":"2026-10-20T14:32:30Z","source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-43860.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H"}]}