# CVE-2021-38504: When interacting with an HTML input element's file picker dialog with webkitdirectory set, a use-after-free could have resulted, leading to…

- Severity: High 8.8 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.77%, higher than 78% of CVEs (2026-12-01)
- Published: 2021-12-08T21:21:59.000Z
- Modified: 2026-06-17T04:02:14.540Z
- Weaknesses: CWE-416
- Assigned by: mozilla

## Description

When interacting with an HTML input element's file picker dialog with webkitdirectory set, a use-after-free could have resulted, leading to memory corruption and a potentially exploitable crash. This vulnerability affects Firefox < 94, Thunderbird < 91.3, and Firefox ESR < 91.3.

(As written by CVE List.)

## Affected

- Mozilla Firefox: from unspecified before 94; before 94.0
- Mozilla Thunderbird: from unspecified before 91.3; before 91.3.0
- Mozilla Firefox ESR: from unspecified before 91.3
- mozilla firefox_esr: before 91.3.0
- debian debian_linux: 9.0; 10.0; 11.0

## Every score

- NVD: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 6.8 Medium `AV:N/AC:M/Au:N/C:P/I:P/A:P`

## References

- <https://www.mozilla.org/security/advisories/mfsa2021-49/> (vendor-advisory)
- <https://www.mozilla.org/security/advisories/mfsa2021-50/> (vendor-advisory)
- <https://www.mozilla.org/security/advisories/mfsa2021-48/> (vendor-advisory)
- <https://bugzilla.mozilla.org/show_bug.cgi?id=1730156> (issue-tracking, permissions-required, vendor-advisory)
- <https://www.debian.org/security/2021/dsa-5026> (third-party-advisory, vendor-advisory)
- <https://lists.debian.org/debian-lts-announce/2021/12/msg00030.html> (mailing-list, third-party-advisory)
- <https://www.debian.org/security/2022/dsa-5034> (third-party-advisory, vendor-advisory)
- <https://lists.debian.org/debian-lts-announce/2022/01/msg00001.html> (mailing-list, third-party-advisory)
- <https://security.gentoo.org/glsa/202202-03> (third-party-advisory, vendor-advisory)
- <https://security.gentoo.org/glsa/202208-14> (third-party-advisory, vendor-advisory)

## Sources

- CVE List: [CVE-2021-38504](https://www.cve.org/CVERecord?id=CVE-2021-38504), CVE Terms of Use, modified 2024-08-04
- NVD: [CVE-2021-38504](https://nvd.nist.gov/vuln/detail/CVE-2021-38504), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-38504 · Whole record: https://cve.day/CVE-2021-38504.json · Rebuilt by cve.day 2026-11-25T22:58:05.898Z
