BreachHunter
Pricing Blog Log inSign up
● thermal huntscan engines onlineassessment only — no exploits
  1. Home
  2. Blog
  3. Exposed package.json: Your Dependency List Is a Recon Gift

Guides · ← All guides

Exposed package.json: Your Dependency List Is a Recon Gift

Published: November 14, 2026 · Last reviewed: November 14, 2026 · 6 min read

By the Ingenious AI team

The short answer: package.json (Node) and composer.json (PHP) are your project's dependency manifests: every library you use, with the exact versions or ranges you installed. Served from the web root, each is rated MEDIUM (4 points) in BreachHunter's sensitive-paths table, for the reason the table states: these files disclose “exact dependency versions, which attackers match against known CVEs.” A manifest turns the attacker's hardest problem — which of ten thousand vulnerabilities applies to you — into a lookup you performed for them.

Run a free BreachHunter assessment on your site →

The manifest exposure belongs to the same family as the version banner — disclosure that aims exploits — with a multiplier: a banner names one component; a manifest names forty. Every dependency in the list has its own CVE history, its own abandoned-or-maintained status, and its own probability of being the weakest thing you run. Publishing the list is publishing your attack surface's table of contents.

This guide covers what a manifest actually reveals beyond versions (scripts, repository URLs, internal package names), how lockfiles sharpen the disclosure to exact builds, and the standard fix — manifests live outside the served root, and the server denies the filenames as a class — plus the software-composition habit (dependency auditing) that addresses the risk the manifest merely advertises.

What a manifest tells an attacker, line by line

Dependencies with versions are the headline: each entry is checked against vulnerability databases, and the intersection — your exact version's known CVEs — becomes the worklist. But the supporting fields leak too. The repository URL points at your source (sometimes a private repo name worth social-engineering with). Scripts reveal your build and deployment commands and tooling. Internal or scoped package names map your architecture and your employer's naming conventions. Even the “engines” field dates your runtime.

Lockfiles (package-lock.json, composer.lock) are the sharper instrument: resolved, exact versions of every transitive dependency — the full tree, not the declared ranges — including the nested library three levels down that nobody on your team chose directly and whose CVE neither of you has heard of. The scanner's table names the manifests; treat the locks as the same finding with better aim, and deny both. The banner parallel is in the version banners guide; the manifest is that problem at fleet scale.

Out of the root, denied by rule, audited as a habit

The structural fix is the one modern frameworks already assume: the web root is a public/ subdirectory, and the manifest sits one level above it, unservable by construction. Where the root cannot move (legacy Node apps served from the project directory), the server deny rule covers the filenames — package.json, package-lock.json, composer.json, composer.lock, yarn.lock — as a set, returning 404. Verify from outside: all five names, plus the .git-style dotfile rule from the .git guide, since manifest and repo exposure are usually the same misplacement.

Then the deeper point: the manifest's audience should be you. Dependency auditing (npm audit, composer audit, Dependabot-class tooling) runs the same CVE matching the attacker runs, on a schedule, with the advantage of also being able to fix what it finds. The exposed-manifest finding closes with the deny rule; the risk it advertised closes with the audit cadence. Both belong in the report response — reviewers credit the pair.

Worked example: pixelforge.example

PixelForge Apps, a small product studio, served its marketing site and API docs from the same Node process that ran its app — project directory as web root. The sensitive-path probe asked for the manifest and got the studio's entire dependency tree, resolved:

GET /package.json -> 200  MEDIUM (-4)  38 dependencies with ranges
GET /package-lock.json -> 200  412 packages, exact versions (transitive included)
Notable: one framework plugin at a version with a published RCE advisory

The studio's response split exactly along this guide's lines: the dangerous dependency was upgraded the same day (the advisory, not the exposure, was the emergency), the app was re-deployed behind a public/ root so manifests became structurally unservable, and lockfile names were added to the server deny list as a second wall. Dependency auditing joined the studio's CI that week. Retest showed 404 across the manifest set — and, more valuable, the next audit report from CI arrived before any scanner's did.

The five actions to take

Closing the manifest exposure:

  1. Probe your root for package.json, package-lock.json, composer.json, composer.lock and yarn.lock — any 200 is the finding.
  2. Move the web root to a public/ subdirectory so manifests sit outside it by construction, where your framework supports it.
  3. Add server deny rules for all manifest and lockfile names as a second layer.
  4. Run dependency audit (npm/composer audit or Dependabot-class tooling) and fix what it flags — starting with anything the exposed list advertised.
  5. Re-scan to confirm 404s, and put dependency auditing on the CI/release cadence permanently.

Run a free BreachHunter assessment on your site →

Frequently asked questions

Our dependencies are all open source anyway. What is secret?

The packages are public; your selection and exact versions are the intelligence. Security here is not secrecy of code but of configuration — the same reason a network map is sensitive though every road on it is public. The manifest tells an attacker which CVEs are worth their next hour.

Is this really MEDIUM? It feels like trivia.

The rating reflects that disclosure alone breaches nothing — an unpatched dependency must also exist. But the manifest is how that dependency gets found, and the base rate of “one outdated transitive package with a bad CVE” across real projects is high. MEDIUM with a fast fix is the honest grade.

Does hiding the manifest replace updating dependencies?

No — it removes the advertisement, not the vulnerability. A determined attacker fingerprints versions behaviorally. The pair is the answer: deny the manifest so casual targeting fails, and audit/update so determined targeting finds patched versions.

We serve the app from the project root and cannot move it this quarter. Interim step?

The deny-rule layer alone closes the external finding: server rules returning 404 for the five filenames. Log any hits on them (probing telemetry is free threat intel), and schedule the structural move — rules rot, directory layouts persist.

What about Python (requirements.txt) or Ruby (Gemfile) projects?

Same class, same fix: the scanner's named rows are the Node/PHP pair, but requirements.txt, Pipfile.lock, Gemfile and Gemfile.lock disclose identically and belong under the same deny rules and root discipline.

Sources

The primary sources behind this guide — the documents we check our own work against:

  • OWASP Top 10 (2021) — A06:2021 Vulnerable and Outdated Components.
  • npm documentation (2025) — what package.json and its lockfile record about a project.
Share this: X · Facebook · LinkedIn · WhatsApp

Related guides

  • Website Security Test: What It Checks, What It Misses, and How to Read Yours · 9 min read
  • Website Security Cheat Sheet: Headers, TLS, Cookies and Exposed Files · 7 min read
  • What a Website Security Assessment Actually Tests · 10 min read
  • TLS/SSL Basics: What Your Certificate Says About Your Site · 8 min read
  • Common Website Misconfigurations (and How to Fix Them) · 11 min read
  • Reading Your First Pentest Report: From Score to Action · 9 min read
  • Deleted ≠ Gone: What the Wayback Machine Keeps After You Delete Your Secrets · 9 min read
  • SQL Injection in Plain English: How One Login Box Can Read Your Database · 9 min read
  • What Does a Website Security Scan Check? · 8 min read
  • Exposed .git Directory: What It Leaks and How to Check · 7 min read
  • Security Headers Missing? What Each Header Stops · 7 min read
  • How Much Does a Penetration Test Cost in 2026? · 7 min read
  • Website Security Checklist for Small Teams (60-second self-check) · 6 min read
  • Reading Your Scan Results: Which Findings Fix First? · 7 min read
  • Content-Security-Policy Missing: What CSP Does and How to Add It Safely · 8 min read
  • HSTS Missing: What Strict-Transport-Security Prevents · 7 min read
  • Clickjacking and X-Frame-Options: How Framing Attacks Work · 7 min read
  • Cookie Flags Explained: Secure, HttpOnly and SameSite · 8 min read
  • Exposed .env File: What Leaks, What Attackers Do Next, What You Do First · 8 min read
  • Directory Listing Enabled: What It Shows Attackers and How to Disable It · 7 min read
  • Mixed Content: Why Your HTTPS Page Still Loads Insecure Resources · 7 min read
  • Expired SSL Certificate: What Breaks, Why Renewal Fails, and How to Catch It Early · 7 min read
  • TLS 1.0 and 1.1 Still Enabled: Why Old Protocols Show Up as a Finding · 7 min read
  • Open Ports on a Web Server: Which Ones Should Never Face the Internet · 8 min read
  • No SPF or DMARC Record: How Missing Email Auth Exposes Your Website · 7 min read
  • Subdomain Takeover: How a Dangling DNS Record Lets Attackers Claim Your Name · 7 min read
  • Forgotten Subdomains: The Staging Site You Forgot Is Still Public · 7 min read
  • WordPress Security Scan: The Exposures an Assessment Finds on WordPress Sites · 8 min read
  • Exposed Backup Files: .bak, .old and .zip Files Sitting in Your Web Root · 7 min read
  • phpinfo() in Production: The Diagnostic Page That Maps Your Server for Attackers · 7 min read
  • Server Version Banners: Why Your Headers Point Attackers to the Right Exploit · 7 min read
  • End-of-Life Software: Running a Server Stack Nobody Patches Anymore · 7 min read
  • CORS Misconfiguration: When Cross-Origin Sharing Opens Your Data to Any Site · 7 min read
  • Open Redirect Vulnerability: How Your Own Domain Sends Visitors to a Phishing Page · 7 min read
  • Dangerous HTTP Methods: What TRACE, PUT and DELETE Should Never Answer · 7 min read
  • Host Header Injection: Poisoned Reset Links and Cache Attacks Explained · 7 min read
  • What Is security.txt? The Small File That Lets Researchers Reach You · 6 min read
  • Admin Panel Exposed to the Internet: What an Assessment Flags and Why · 7 min read
  • phpMyAdmin Exposed: Why This Database Door Is a Prime Brute-Force Target · 7 min read
  • Spring Boot Actuator Exposed: Environment Dumps, Heap Leaks and Shutdown Endpoints · 7 min read
  • Debug Console in Production: The Finding That Can Become Code Execution · 7 min read
  • Exposed AWS Credentials File: The /.aws/credentials Finding, Explained · 7 min read
  • Referrer-Policy and Permissions-Policy: The Two Quiet Headers You Are Probably Missing · 6 min read
  • DNS Zone Transfer Open (AXFR): Handing Out Your Entire DNS Map · 6 min read
  • Certificate Name Mismatch: Why the Cert Does Not Match Your Domain · 6 min read
  • Website Security Assessments for Agencies: Checking Every Client Site Without a Security Team · 8 min read
  • SaaS Security Questionnaires: What Buyers Check About Your Website First · 8 min read
  • Ecommerce Website Security: The Exposures That Put Your Checkout at Risk · 8 min read
  • Small Business Website Security: The Checks That Matter at Your Size · 7 min read
  • How to Prepare for a Website Security Assessment (and Read the Report Calmly) · 7 min read
  • Vulnerability Severity Explained: What Critical, High, Medium and Low Actually Mean · 7 min read
  • Retest After Fixes: How to Prove a Security Finding Is Actually Closed · 7 min read
  • Security Assessment vs Vulnerability Scan vs Pentest: What Is the Difference? · 7 min read
  • How Long Does a Website Security Scan Take? · 6 min read
  • Website Security Drift: Why Last Month's Clean Scan Is Already Out of Date · 7 min read
  • WordPress Site Keeps Getting Hacked After Cleanup · 8 min read
  • Google Blacklist Removal: Getting the Red Warning Off Your Site · 8 min read
  • VirusTotal Flagged My Site: How to Clear a False Positive · 8 min read

Related from the Ingenious AI suite

  • Ingenious AI — the full suite of security and compliance tools
  • DomainGuard — domain impersonation and typosquat defense
  • See BreachHunter pricing →
BreachHunter · by Ingenious AI · read-only security assessment — scan only targets you own or are authorized to test
About · Contact · Blog · vs Intruder · Privacy · Terms · Security · Threats · Nextcloud Check · Verify Evidence · Help · Redeem
More from Ingenious AI:
DisclosureGuard — AI disclosure compliance · Vibe-Code Audit — AI code security scanner · Rogue-Agent Defense — AI agent firewall · ChatBreaker — AI chatbot red-teaming · ModelMinder — AI model deprecation radar · TermsWatch — AI vendor terms monitor · Agent Flight Recorder — tamper-evident agent audit trails · Agent Auth Gateway — agent credentials & kill switch · DomainGuard — domain impersonation defense · Agent Passport — Know-Your-Agent registry · AgentGate — agent policy publisher · AgentBlock — AI agent & crawler access control · BoundaryVault — agent log forensics · Agentic Receipts — verifiable agent payment receipts · EvalEgress — eval-to-production exposure scan · HomeShield MCP — home AI server exposure check · WireWatch — payment verification ceremony · ADMT Notice Kit — AI decision notice compliance · DueLadder — human-approved invoice chasing · Agent-Ready Store Audit — can AI agents buy from your store · ContentCraft AI — content operations · AgentReady — agent-readiness checks · AI Audit Exchange — AI audit exchange · CallbackShield — callback & webhook protection · CompanionGuard — AI companion safety guardrails · CRAClock — EU Cyber Resilience Act deadline clock · EInvoice Translator — e-invoice format translator · GEOFixer — geo & local listing fixes · MandateGuard — agent spending mandates · OutcomeMeter — AI outcome measurement · ProvenanceGuard — content provenance checks · ReviewDesk — review response desk · ReviewProof — verified review evidence · TakedownCoop — coordinated phishing takedowns · TrustGate — trust & safety gating · BreachHunter — website penetration testing · All 36 platforms — the Ingenious AI portfolio

We use cookies. Necessary cookies keep the site working. With your permission we also use analytics cookies (to understand usage) and marketing cookies (for ads). Read our privacy policy.

NecessaryRequired for login, security and core features. Always on.
AnalyticsHelps us understand which pages are useful.
MarketingUsed for advertising and measuring ad performance.

    No match. Try “pricing”, “php2shell” or “contact” — or press Esc to close.

    ↑↓ navigate · Enter open · Esc close