package-json: NPM package.json Disclosure

2026-08-18 package-json PoC Public

Description

All NodeJS packages contain a file, usually in the project root, called package.json - this file holds various metadata relevant to the project generated by package managers such as npm, yarn, pnpm.

PoC

id: package-json

info:
  name: NPM package.json Disclosure
  author: geeknik,afaq,noraj
  severity: low
  description: |
    All NodeJS packages contain a file, usually in the project root, called package.json - this file holds various metadata relevant to the project generated by package managers such as npm, yarn, pnpm.
  reference:
    - https://docs.npmjs.com/cli/v9/configuring-npm/package-json
    - https://classic.yarnpkg.com/lang/en/docs/package-json/
    - https://pnpm.io/package_json
  classification:
    cwe-id: CWE-552
  metadata:
    verified: true
    max-request: 2
  tags: config,exposure,node,npm,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/package.json"
      - "{{BaseURL}}/package-lock.json"

    matchers-condition: and
    matchers:
      - type: word
        words:
          - "name"
          - "version"
        condition: and

      - type: word
        part: header
        words:
          - "application/json"

      - type: status
        status:
          - 200
# digest: 4a0a0047304502210099470739b4b6f4cc3349c77e4a8fdf6102e9eb2d9613d4d92fd746aeba596349022046c364b344833125647f3f9e3fb81a1460274038d1b66fa18aaca6523149a86f:922c64590222798bb761d5b6d8e72950

# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.

Related Vulnerabilities