CVE-2026-4408: Samba: remote code execution in samr

Published May 19, 2026
·
Updated

A flaw was found in Samba. A remote attacker can exploit a misconfiguration in Samba file servers and classic domain controllers that use the "check password script" feature. If this script is configured with the %u substitution character, the client-controlled username is passed without proper escaping of shell meta-characters. This vulnerability allows an attacker to achieve remote command execution on the affected system. This issue primarily affects non-standard configurations where the "check password script" is used with %u and the samba-dcerpcd service is started as a system service.

Other sources

Remote Code Execution in SAMR when check password script contains %u substitution placeholder

Debian

Samba file servers and classic (non-AD) domain controllers offer the SamValidatePasswordChange and SamValidatePasswordReset RPC services on the SAMR DCE/RPC service when running over NCACNIPTCP. Both services pass a username and password to the "check password script" that can be configured in smb.conf.

If the "check password script" is configured with the %u substitution character, the client-controlled username is passed to the "check password script" without escaping shell meta-characters, leading to a remote command execution vulnerability.

This is a non-standard configuration in several ways:

It affects Samba file servers and classic (non-AD) domain controllers that have the "check password script" configured with the %u substitution character. Active Directory Domain Controllers are not affected, they do not expand the username via the %u substitution character.

The problem is much less dangerous if %u has single quotes directly around it, e.g. '%u', but it's still possible to inject command line options.

Standard Samba file servers and classic domain controllers are also only affected if the samba-dcerpcd service is started as a system service, which can only happen if "rpc start on demand helpers" is set to the non-default setting "no". In the default configuration for DCE/RPC, smbd starts the samba-dcerpcd in a way that makes the vulnerable code inaccessible.

Red Hat

Affected Software

6 affected componentsFixes available
debian/samba<=2:4.13.13+dfsg-1~deb11u6, <=2:4.13.13+dfsg-1~deb11u7, <=2:4.17.12+dfsg-0+deb12u3, <=2:4.22.8+dfsg-0+deb13u1, <=2:4.24.2+dfsg-1
2:4.17.12+dfsg-0+deb12u42:4.22.8+dfsg-0+deb13u22:4.24.3+dfsg-1
redhat OpenShift Container Platform=4.0
Samba Samba>=4.1.0<4.21.0
redhat Enterprise Linux=6.0
redhat Enterprise Linux=7.0
redhat Enterprise Linux=9.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/samba to a version that resolves this vulnerability.

    Fixed in 2:4.17.12+dfsg-0+deb12u4Fixed in 2:4.22.8+dfsg-0+deb13u2Fixed in 2:4.24.3+dfsg-1

Event History

May 19, 2026
Data Sourced
via Red Hat·09:27 AM
DescriptionSeverityAffected Software
May 26, 2026
Data Sourced
via Ubuntu·04:09 PM
RemedyDescriptionSeverityAffected Software
Data Sourced
via Debian·04:10 PM
DescriptionAffected Software
May 28, 2026
CVE Published
via MITRE·07:25 AM
Data Sourced
via MITRE·07:25 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·09:16 AM
DescriptionSeverityWeaknessAffected Software
Aug 14, 58405
Event
via NVD·05:12 AM
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-4408?

The severity of CVE-2026-4408 is critical, with a score of 9.8.

2

What is CVE-2026-4408 about?

CVE-2026-4408 is a flaw in Samba that allows remote code execution via misconfiguration of the 'check password script' feature.

3

How do I fix CVE-2026-4408?

To fix CVE-2026-4408, ensure that the 'check password script' feature is configured correctly and does not use the %u placeholder.

4

What systems are affected by CVE-2026-4408?

CVE-2026-4408 affects Samba installations on Red Hat Enterprise Linux, Debian/Samba, and Red Hat OpenShift Container Platform.

5

What type of vulnerability is CVE-2026-4408?

CVE-2026-4408 is classified as an OS Command Injection vulnerability.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203