# CVE-2026-48980: mcdope pam_usb environment variable injection in local-check logic

Source: https://junglewise.ai/threats/cve-2026-48980-mcdope-pam-usb-environment-variable-injection-in-local-check  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-06-18. Updated: 2026-06-21  
License: CC BY 4.0 with a link back

CVE-2026-48980 · Severity: medium · CVSS 6.3 · Published 2026-06-18

pam_usb is a tool that allows users to log into Linux systems using a USB drive as a physical key. A security flaw in how it checks for local versus remote sessions could allow a local attacker to trick the system into misidentifying their connection type. This could potentially be used to bypass security policies or gain unauthorized access to administrative functions like sudo.

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

## Quick answers

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

**How severe is CVE-2026-48980?** Medium severity, with a CVSS score of 6.3, published 18 June 2026.

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

**Is there a fix for CVE-2026-48980?** A patch was published on 2026-05-23: Version 0.9.2 released Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

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

**Am I affected by CVE-2026-48980?** 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 pam_usb module incorrectly utilizes the getenv() function to retrieve environment variables such as XRDP_SESSION, DISPLAY, and TMUX to determine if a session is local or remote. Because PAM modules often execute within the context of setuid binaries (like sudo or su), a local attacker can manipulate the process environment to inject these variables. This reliance on untrusted inputs in a security decision (CWE-807) allows an attacker to influence the 'local-check' logic. The vulnerability is resolved in version 0.9.2 by replacing getenv() with secure_getenv(), which returns NULL when the effective UID does not match the real UID.

## Affected products

- mcdope pam_usb < 0.9.2

## Timeline

- 2026-05-23: patched: Version 0.9.2 released
- 2026-05-24: advisory: GitHub Security Advisory published
- 2026-06-18: disclosed: CVE-2026-48980 published to NVD

## References

- [https://github.com/mcdope/pam_usb/releases/tag/0.9.2](https://github.com/mcdope/pam_usb/releases/tag/0.9.2)
- [https://github.com/mcdope/pam_usb/security/advisories/GHSA-qr83-mf3h-fvqr](https://github.com/mcdope/pam_usb/security/advisories/GHSA-qr83-mf3h-fvqr)

## 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)
