Oturia · Oturia Smart Google Code Inserter · CVE-2018-3810
**Name of the Vulnerable Software and Affected Versions**
Oturia Smart Google Code Inserter plugin versions prior to 3.5
**Description**
The issue allows unauthenticated attackers to insert arbitrary JavaScript or HTML code that runs on all pages served by WordPress. This is achieved via the `sgcgoogleanalytic` parameter. 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.
**Recommendations**
For Oturia Smart Google Code Inserter plugin versions prior to 3.5, update to version 3.5 or later to resolve the issue. As a temporary workaround, consider disabling the `saveGoogleCode()` function in smartgooglecode.php until a patch is available. Restrict access to the `sgcgoogleanalytic` parameter to minimize the risk of exploitation.