# CVE-2026-47271: mcdope pam_usb NULL pointer dereference in src/mem.c

Source: https://junglewise.ai/threats/cve-2026-47271-mcdope-pam-usb-null-pointer-dereference-in-src-mem-c  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-05-27. Updated: 2026-05-27  
License: CC BY 4.0 with a link back

CVE-2026-47271 · Severity: medium · CVSS 5.1 · Published 2026-05-27

pam_usb is a tool that allows users to log into Linux systems using a USB drive instead of a password. A flaw in how the software handles memory errors can cause the login system to crash if the computer runs out of memory. This could allow an attacker to prevent legitimate users from logging in or using administrative commands like sudo, effectively locking them out of the system.

Technologies: [Mcdope Pam Usb](https://junglewise.ai/threats/technologies/pam-usb). Vendors: [Mcdope](https://junglewise.ai/threats/vendors/mcdope).

## Quick answers

**Is CVE-2026-47271 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-47271 being exploited in the wild.

**How severe is CVE-2026-47271?** Medium severity, with a CVSS score of 5.1, published 27 May 2026.

**Which products and versions are affected?** Mcdope Pam Usb < 0.9.0.

**Is there a fix for CVE-2026-47271?** A patch was published on 2026-05-27: Fix released in version 0.9.0 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-47271 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2026-47271?** Check whether you run Mcdope Pam Usb at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

The vulnerability is a NULL pointer dereference in src/mem.c. The software implemented out-of-memory (OOM) guards for xmalloc(), xrealloc(), and xstrdup() using assert() statements. Because many Linux distributions (including Debian, Fedora, and Arch) compile packages with the NDEBUG flag, these assertions are removed in production builds. Consequently, when memory allocation fails, the functions return NULL instead of aborting. Subsequent code dereferences these NULL pointers without checking, leading to a crash of the PAM module. If this occurs during a sudo or login attempt, it results in a local denial-of-service. The issue is fixed in version 0.9.0 by replacing assertions with explicit NULL checks and abort paths.

## Affected products

- mcdope pam_usb < 0.9.0

## Timeline

- 2026-05-20: advisory: GitHub Security Advisory published
- 2026-05-27: disclosed: CVE published to NVD
- 2026-05-27: patched: Fix released in version 0.9.0

## References

- [https://github.com/mcdope/pam_usb/commit/d003e551b794a9e3774ff4720830fb7aadaa48bd](https://github.com/mcdope/pam_usb/commit/d003e551b794a9e3774ff4720830fb7aadaa48bd)
- [https://github.com/mcdope/pam_usb/security/advisories/GHSA-7rvx-jcc6-7hqq](https://github.com/mcdope/pam_usb/security/advisories/GHSA-7rvx-jcc6-7hqq)

## Related threats

- [pam_usb heap out-of-bounds read in display server handling](https://junglewise.ai/threats/cve-2026-64667-pam-usb-provides-hardware-authentication-for-linux-using)
- [pam_usb XRDP session bypass via environment variable](https://junglewise.ai/threats/cve-2026-64666-pam-usb-provides-hardware-authentication-for-linux-using)
- [mcdope pam_usb symlink race condition in pad directory creation](https://junglewise.ai/threats/cve-2026-48983-mcdope-pam-usb-symlink-race-condition-in-pad-directory-creation)
- [mcdope pam_usb race condition in one-time pad update](https://junglewise.ai/threats/cve-2026-48982-mcdope-pam-usb-race-condition-in-one-time-pad-update)
- [mcdope pam_usb XXE in configuration file parsing](https://junglewise.ai/threats/cve-2026-48981-mcdope-pam-usb-xxe-in-configuration-file-parsing)
