Xml Basic Auth Method Used
Description
Detects the use of Basic Authentication method in XML configuration files. Basic Authentication sends credentials encoded in base64 which can be easily decoded if intercepted, making it insecure unless used with TLS/SSL encryption. This poses a risk of credential theft through network sniffing.
Detection Strategy
• Scans XML configuration files for <auth-method> tags
• Checks if the content of auth-method tag contains the word 'basic' (case insensitive)
• Reports a vulnerability when Basic Authentication is configured, indicating potential transmission of credentials in an easily decodable format
Vulnerable code example
<?xml version="1.0" encoding="UTF-8"?>
<web-app>
<login-config>
<auth-method>BASIC</auth-method> <!-- Vulnerable: BASIC auth exposes credentials in Base64 encoding -->
<realm-name>MySecureRealm</realm-name>
</login-config>
</web-app>✅ Secure code example
<?xml version="1.0" encoding="UTF-8"?>
<web-app>
<login-config>
<auth-method>FORM</auth-method> <!-- Secure: Form-based auth avoids exposing credentials in headers -->
<form-login-config>
<form-login-page>/login</form-login-page>
<form-error-page>/login?error</form-error-page>
</form-login-config>...Search for vulnerabilities in your apps for free with Fluid Attacks' automated security testing! Start your 21-day free trial and discover the benefits of the Continuous Hacking Essential plan. If you prefer the Advanced plan, which includes the expertise of Fluid Attacks' hacking team, fill out this contact form.