CVE-2026-21858: n8n Webhooks - Remote Code Execution

2026-01-16 n8n Webhooks PoC Public

Description

n8n is an open source workflow automation platform. Versions starting with 1.65.0 and below 1.121.0 enable an attacker to access files on the underlying server through execution of certain form-based workflows. A vulnerable workflow could grant access to an unauthenticated remote attacker, resulting in exposure of sensitive information stored on the system and may enable further compromise depending on deployment configuration and workflow usage. This issue is fixed in version 1.121.0.

PoC

id: CVE-2026-21858

info:
  name: n8n Webhooks - Remote Code Execution
  author: rxerium
  severity: critical
  description: |
    n8n is an open source workflow automation platform. Versions starting with 1.65.0 and below 1.121.0 enable an attacker to access files on the underlying server through execution of certain form-based workflows. A vulnerable workflow could grant access to an unauthenticated remote attacker, resulting in exposure of sensitive information stored on the system and may enable further compromise depending on deployment configuration and workflow usage. This issue is fixed in version 1.121.0.
  impact: |
    Unauthenticated remote attackers can access sensitive files, potentially leading to information disclosure and further system compromise.
  remediation: |
    Update to version 1.121.0 or later.
  reference:
    - https://thehackernews.com/2026/01/critical-n8n-vulnerability-cvss-100.html
    - https://nvd.nist.gov/vuln/detail/CVE-2026-21858
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N
    cvss-score: 10.0
    cve-id: CVE-2026-21858
    epss-score: 0.78447
    epss-percentile: 0.99561
    cwe-id: CWE-20
  metadata:
    verified: true
    max-request: 2
    shodan-query: http.favicon.hash:-831756631
  tags: cve,cve2026,n8n,workflow,rce,vkev,vuln

flow: http(1) || http(2)

http:
  - method: GET
    path:
      - "{{BaseURL}}/signin"

    host-redirects: true
    max-redirects: 3

    extractors:
      - type: regex
        name: base64_content
        group: 1
        regex:
          - '<meta name="n8n:config:sentry" content="([A-Za-z0-9+/=]+)"'
        internal: true

      - type: dsl
        name: version
        dsl:
          - 'replace_regex(base64_decode(base64_content), ".*n8n@([0-9]+\\.[0-9]+\\.[0-9]+).*", "$1")'
        internal: true

      - type: dsl
        dsl:
          - '"n8n Version: " + version'

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "<title>n8n.io"
        case-insensitive: true

      - type: status
        status:
          - 200

      - type: dsl
        dsl:
          - 'compare_versions(version, ">= 1.65.0", "< 1.121.0")'

  - method: GET
    path:
      - "{{BaseURL}}/rest/sentry.js"

    extractors:
      - type: regex
        name: version
        group: 1
        regex:
          - 'release":"([0-9.]+)"'
        internal: true

      - type: dsl
        dsl:
          - '"n8n Version: " + version'

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '"release"'
        case-insensitive: true

      - type: status
        status:
          - 200

      - type: dsl
        dsl:
          - compare_versions(version, '>= 1.65.0', '< 1.121.0')
# digest: 490a00463044022064c2bd3661c3dcaab1d05e8129d9202a01d33badd4735a8ae67999013125642c02207ce390bcedf7161ecaaa367d1839f559f94021d6df3ed78ccdc94bcb639e30ca:922c64590222798bb761d5b6d8e72950

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

References

Related Vulnerabilities