Back to Introduction
High Risk
Wiki Entry
Exposed package-lock.json File
Your package-lock.json file is publicly accessible. This file contains exact dependency versions and can help attackers identify vulnerable packages.
Why This Matters
Attackers can use the exact version information to look up known vulnerabilities in your dependencies and craft targeted attacks. This is more dangerous than exposed package.json.
How to Fix
Framework-specific solutions and general best practices
Never expose package-lock.json publicly. Move it out of your web root and add it to .gitignore. Configure your server to return 404 for this file.
Quick Reference
Severity
High Risk
ID
exposed_package_lockAI Assistant Prompt
Copy this prompt to ask an AI for help fixing this vulnerability:
Please fix the "Exposed package-lock.json File" security vulnerability in this web application. The issue is: Your package-lock.json file is publicly accessible. This file contains exact dependency versions and can help attackers identify vulnerable packages. Make a plan and implement based on my project.