Missing server configuration to reduce server fingerprinting
- Rule ID: javascript_express_reduce_fingerprint
- Languages: javascript
- Source: reduce_fingerprint.yml
Description
Reducing server fingerprinting enhances security by making it harder for attackers to identify the software your server is running. Server fingerprinting involves analyzing the unique responses of server software to specific requests, which can reveal information about the server's software and version. While not a direct security vulnerability, minimizing this information leakage is a proactive step to obscure details that could be used in targeted attacks.
Remediations
- Do disable the
X-Powered-By
header in Express.js applications to prevent revealing the server's technology stack. Use theapp.disable()
method to achieve this.app.disable('x-powered-by');
References
Associated CWE
Configuration
To skip this rule during a scan, use the following flag
bearer scan /path/to/your-project/ --skip-rule=javascript_express_reduce_fingerprint
To run only this rule during a scan, use the following flag
bearer scan /path/to/your-project/ --only-rule=javascript_express_reduce_fingerprint