Java Http Url In Properties
Description
Detects the use of unencrypted HTTP URLs in Java properties files, which can expose sensitive data to man-in-the-middle attacks. When applications use plaintext HTTP instead of HTTPS for remote connections, attackers can potentially intercept and manipulate the transmitted data.
Detection Strategy
• Scans Java .properties files for configuration entries
• For each property value in the file, checks if it contains an HTTP URL (not HTTPS)
• Reports a vulnerability when a property is configured with an unencrypted 'http://' URL
• Ignores commented lines and protected/encrypted values in the properties file
Vulnerable code example
# Configuration file showing unsafe endpoint bindings
# Dangerous: Binds service to all interfaces (0.0.0.0)
bg.ws.endpoint = http://0.0.0.0
# Unsafe: Using non-secure protocols
bg.ws.endpoint = http://api.example.com
bg.ws.endpoint = ftp://storage.example.com✅ Secure code example
# Configuration file with secure endpoint bindings
# Secure: Bind service only to localhost for internal access
bg.ws.endpoint = https://localhost
# Safe: Using encrypted protocols with specific domains
bg.ws.endpoint = https://api.example.com # Using HTTPS instead of HTTP
bg.ws.endpoint = sftp://storage.example.com # Using SFTP instead of FTP...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.