SecurityContext

CVE-2021-43860: Flatpak - Broken Access Control

  • Cve: CVE-2021-43860
  • Name: Flatpak - Broken Access Control
  • Description: 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.
  • Impact: Attackers can grant themselves hidden permissions, potentially leading to privilege escalation or unauthorized access.
  • Remediation: Update to version 1.12.3 or 1.10.6 or later.
  • Vulnerability type: broken_access_control
  • Vulnerability impact: privilege_escalation
  • Requirement type: none
  • Labels source: projectdiscovery
  • Severity: high
  • Cvss score: 8.6
  • Cvss vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
  • Epss score: 0.01441
  • Epss percentile: 0.73891
  • Assignee: [email protected]
  • Published at: 2022-01-12T22:15:07Z
  • Age in days: 1777
  • Modified at: 2026-06-17T04:11:35Z
  • Patch available: yes
  • References total: 11
  • Products total: 4
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2021-43860
  • Nvd status: modified
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
  • Not known: requirements, hackerone

Cwe

IdName
CWE-269Improper Privilege Management
CWE-276Incorrect Default Permissions

References

Same in every row:

  • Source: nvd
UrlTags
https://github.com/flatpak/flatpak/commit/54ec1a482dfc668127eaae57f135e6a8e0bc52daPatch, Third Party Advisory
https://github.com/flatpak/flatpak/commit/65cbfac982cb1c83993a9e19aa424daee8e9f042Patch, Third Party Advisory
https://github.com/flatpak/flatpak/commit/93357d357119093804df05acc32ff335839c6451Patch, Third Party Advisory
https://github.com/flatpak/flatpak/commit/ba818f504c926baaf6e362be8159cfacf994310ePatch, Third Party Advisory
https://github.com/flatpak/flatpak/commit/d9a8f9d8ccc0b7c1135d0ecde006a75d25f66aeePatch, Third Party Advisory
https://github.com/flatpak/flatpak/security/advisories/GHSA-qpjc-vq3c-572jPatch, Third Party Advisory
https://github.com/flatpak/flatpak/releases/tag/1.10.6Release Notes, Third Party Advisory
https://github.com/flatpak/flatpak/releases/tag/1.12.3Release Notes, Third Party Advisory
https://www.debian.org/security/2022/dsa-5049Third Party Advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/APFTBYGJJVJPFVHRXUW5PII5XOAFI4KH/

Products

Same in every row:

  • Platform bound: no
  • Sources: nvd
ProductAffectedUrl
flatpak:flatpak>= 1.11.1, <= 1.12.3; < 1.10.6/v1/products/flatpak/flatpak
debian:debian_linux= 11.0, = 10.0, = 9.0/v1/products/debian/debian_linux
fedoraproject:fedora= 35/v1/products/fedoraproject/fedora
redhat:enterprise_linux= 8.0/v1/products/redhat/enterprise_linux

Projects

RepositoryLink kindsIndexedUrl
flatpak/flatpakcommit, fix, releases, security_advisoryyes/v1/repositories/flatpak/flatpak

Index

  • Checked, none or zero: repositories, repositories high signal, packages

Exploitation

  • Exposed hosts: 4739835
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, remote, authentication required
  • Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports