CVE-2021-27803 is a use of freed memory in the Wi-Fi Direct (P2P) provision discovery code of wpa_supplicant 1.0 to 2.9: a crafted request from an attacker in radio range can crash the client and possibly run code. Only builds with CONFIG_P2P are affected. NVD scores it 7.5; 2.10 fixes it.
Vulnerability summary
CVSS base score
7.5
High severity
EPSS score (FIRST)
1.2%
Probability of exploitation in the wild in the next 30 days
CISA KEV catalog
No
Not listed
Published
Vulnerability ID: CVE-2021-27803 · Source: NVD
Affected components
| Component | CPE | Version range |
|---|---|---|
| wpa_supplicant (Wi-Fi Direct / P2P) | cpe:2.3:a:w1.fi:wpa_supplicant:*:*:*:*:*:*:*:* | >= 1.0, < 2.10 (NVD) with CONFIG_P2P=y; fixed in 2.10 |
| OpenWrt wpa-supplicant-p2p package | — | OpenWrt builds hostapd and wpa_supplicant from git snapshots dated 2026-08-07 on main, 2025-08-26 on openwrt-25.12 and 2024-09-15 on openwrt-24.10 (read 2026-11-18); CONFIG_P2P=y only in the wpa-supplicant-p2p variant |
| Buildroot wpa_supplicant | — | 2.12 on master (read 2026-11-18); CONFIG_P2P enabled with the AP support option |
What does this mean for affected devices?
NVD's description: "A vulnerability was discovered in how p2p/p2p_pd.c in wpa_supplicant before 2.10 processes P2P (Wi-Fi Direct) provision discovery requests. It could result in denial of service or other impact (potentially execution of arbitrary code), for an attacker within radio range." NVD's Primary score is CVSS v3.1 7.5 (CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H), matched by the CISA ADP score, and CVSS v2 5.4; NVD records the weakness as NVD-CWE-noinfo. The CPE range is wpa_supplicant 1.0 up to, not including, 2.10, and the record was published on 2021-02-26 (NVD).
What triggers the bug?
The w1.fi 2021-1 advisory, published 2021-02-25, says that "under a corner case condition, an invalid Provision Discovery Request frame could end up reaching a state where the oldest peer entry needs to be removed. With a suitably constructed invalid frame, this could result in use (read+write) of freed memory." The attacker needs to be "within radio range of the device running P2P discovery"; no pairing or credentials are required. The affected configuration is "wpa_supplicant v1.0-v2.9 with CONFIG_P2P build option enabled". The advisory was also posted to oss-security the same day. w1.fi advisory 2020-2 covers a second Wi-Fi Direct heap bug in the same build option, CVE-2021-0326.
Which devices carry P2P?
Wi-Fi Direct runs in wpa_supplicant, so the exposure is in devices that use wpa_supplicant as a station with P2P compiled in and P2P discovery active. Router images are less likely to carry it: OpenWrt builds CONFIG_P2P=y only into its separate wpa-supplicant-p2p variant, and Buildroot's wpa_supplicant recipe, at 2.12, turns on CONFIG_P2P together with access point support. The Debian security tracker lists fixed wpa packages 2:2.4-1+deb9u9 for stretch (DLA-2581-1) and 2:2.7+git20190128+0c1e29f-6+deb10u3 for buster (DSA-4898-1). Our hostapd and wpa_supplicant firmware guide shows how to find CONFIG_P2P and p2p_disabled on a device.
How do you fix or mitigate it?
Ship wpa_supplicant 2.10 or later, or merge the w1.fi patch "P2P: Fix a corner case in peer addition based on PD Request". Where P2P is not needed, w1.fi lists two mitigations: disable it at runtime with P2P_SET disabled 1 or p2p_disabled=1 in each wpa_supplicant configuration file, or remove CONFIG_P2P=y from the build. Other wpa_supplicant pages: CVE-2019-13377 (SAE Brainpool leak), CVE-2019-11555 and CVE-2015-4141.
CVE-2021-27803 is not in the CISA KEV catalog as of 2026-11-18 (catalog version 2026.11.17). FIRST EPSS gives it 0.01228, the 69.4th percentile, in the 2026-11-17 dataset (CISA KEV, FIRST EPSS).
Evidence
- NVD: p2p/p2p_pd.c in wpa_supplicant before 2.10, P2P provision discovery requests, DoS or possibly code execution, attacker within radio range; Primary CVSS v3.1 7.5 AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H, CISA ADP 7.5, CVSS v2 5.4; NVD-CWE-noinfo; CPE >= 1.0 < 2.10; published 2021-02-26. — NVD
- w1.fi 2021-1 (2021-02-25): invalid Provision Discovery Request in a corner case leads to use (read+write) of freed memory; attacker within radio range of a device running P2P discovery; wpa_supplicant v1.0-v2.9 with CONFIG_P2P; mitigations: patch, v2.10, P2P_SET disabled 1 or p2p_disabled=1, remove CONFIG_P2P. — w1.fi
- oss-security 2021-02-25: the w1.fi P2P provision discovery advisory posted to the list. — oss-security
- OpenWrt wpa_supplicant-p2p.config: CONFIG_P2P=y. — OpenWrt
- Buildroot wpa_supplicant.mk 2.12: CONFIG_AP and CONFIG_P2P enabled when BR2_PACKAGE_WPA_SUPPLICANT_AP_SUPPORT is set. — Buildroot
- Debian: wpa fixed 2:2.4-1+deb9u9 (stretch, DLA-2581-1), 2:2.7+git20190128+0c1e29f-6+deb10u3 (buster, DSA-4898-1). — Debian security tracker
- CVE-2021-27803 is not in the CISA KEV catalog, version 2026.11.17 (1,782 entries), checked 2026-11-18. — CISA KEV
- EPSS 0.01228, percentile 0.69377, dataset 2026-11-17. — FIRST EPSS

Related advisories
Sources
Frequently asked questions
Which wpa_supplicant builds are affected by CVE-2021-27803?
Versions 1.0 to 2.9 built with CONFIG_P2P=y. Builds without Wi-Fi Direct support do not contain the vulnerable code (per w1.fi advisory 2021-1 and NVD).
Can CVE-2021-27803 run code on a device?
Possibly. w1.fi says the crafted frame leads to reading and writing freed memory, which can terminate wpa_supplicant and potentially allow code execution by an attacker within radio range (per w1.fi advisory 2021-1).
How do I mitigate CVE-2021-27803 without updating?
Disable P2P with the control interface command P2P_SET disabled 1 or with p2p_disabled=1 in each wpa_supplicant configuration file, or rebuild without CONFIG_P2P (per w1.fi advisory 2021-1).
Is CVE-2021-27803 in the CISA KEV catalog?
No, not as of 2026-11-18 (catalog version 2026.11.17). FIRST EPSS gives it 0.01228, the 69.4th percentile, in the 2026-11-17 dataset (per CISA KEV and FIRST EPSS).
Questions about this page?