CWE-540: Inclusion of Sensitive Information in Source Code
35 CVEs have CWE-540 as their primary weakness. 0 of them are in the CISA KEV catalog. The highest EPSS score among them is 1.003%.
The product (such as a web server or repository) provides access to source code is not intended to be accessible to users but contains sensitive information.
Child of CWE-538: Insertion of Sensitive Information into Externally-Accessible File or Directory
Mitigations
- Architecture and Design System Configuration: Recommendations include removing the script from the web server and moving it to a location not accessible from the Internet.
Observed examples
- CVE-2022-25512: Server for Team Awareness Kit (TAK) application includes sensitive tokens in the JavaScript source code.
- CVE-2022-24867: The LDAP password might be visible in the html code of a rendered page in an IT Asset Management tool.
- CVE-2007-6197: Version numbers and internal hostnames leaked in HTML comments.
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cwe_lookup/CWE-540'curl 'https://api.contrastcyber.com/cve_search?cwe_id=CWE-540'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).