go2rtc-unauth: go2rtc - Unauthenticated API Access

2026-12-04 PoC Public

Description

go2rtc contains a missing authentication caused by the HTTP API on port 1984 running without credentials unless api.username and api.password are set, letting remote attackers read stream sources and configuration, rewrite the configuration and restart or stop the process.

Details

Severity
高危
Published
PoC
Public

PoC

id: go2rtc-unauth

info:
  name: go2rtc - Unauthenticated API Access
  author: s4e-io
  severity: high
  description: |
    go2rtc contains a missing authentication caused by the HTTP API on port 1984 running without credentials unless api.username and api.password are set, letting remote attackers read stream sources and configuration, rewrite the configuration and restart or stop the process.
  impact: |
    Attackers can access camera streams and change the configuration, leading to command execution through exec sources.
  remediation: |
    Set api.username and api.password, or bind api.listen to 127.0.0.1 and restrict access to port 1984.
  reference:
    - https://github.com/AlexxIT/go2rtc#security
    - https://github.com/AlexxIT/go2rtc/blob/v1.9.15/internal/api/api.go
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L
    cvss-score: 8.6
    cwe-id: CWE-306
  metadata:
    max-request: 1
    verified: true
    vendor: alexxit
    product: go2rtc
    shodan-query: http.title:"go2rtc"
    fofa-query: title="go2rtc"
  tags: go2rtc,camera,iot,exposure,misconfig,unauth

http:
  - raw:
      - |
        GET /api HTTP/1.1
        Host: {{Hostname}}

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(content_type, "json")'
          - 'contains_all(body, "\"config_path\"", "\"default_query\"", "\"version\"")'
          - 'regex("\"rtsp\"\\s*:\\s*\\{\\s*\"listen\"", body)'
        condition: and

    extractors:
      - type: json
        part: body
        json:
          - '.version'
# digest: 490a0046304402201336260da2896e1c1a5c3f772441a19e702abd9b11a619c91062e0d59c2d355102203abbf2f3caf84f26e343f1a8a75b96ff9ec2200d3a781275fd9643bd7867250e:922c64590222798bb761d5b6d8e72950

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

References

微信搜一搜 biu.life