Unmasking Hidden Risks: The Dangers of Unencrypted HTTP in PrestaShop Modules

The Initial Alarm: Unencrypted HTTP in PrestaShop Modules

A recent discussion on the PrestaShop forum brought to light a critical security concern: third-party modules communicating over unencrypted HTTP. Forum user Andy C raised the alarm after discovering a module contacting its developer via an insecure HTTP connection, questioning the inherent dangers of such a practice. This immediately sparked a valuable conversation among the community, revealing both the subtle and overt ways modules can compromise shop security.

Beyond the Surface: Native Modules and Data Collection

The discussion initially touched upon PrestaShop's own ecosystem. Fred from PrestaHeroes highlighted that several native modules, such as ps_mbo, ps_accounts, ps_eventbus, and gamification, collect and transmit store data to PrestaShop's cloud or connect to the marketplace. While these typically operate over secure HTTPS, their existence underscores the fact that modules often perform 'under-the-covers' operations, making it crucial for merchants and developers to understand what data is being sent and how.

Deep Dive: Identifying Unencrypted Calls in Third-Party Modules

The core of the thread focused on practical methods for detecting unencrypted HTTP calls in third-party modules:

  • Code Review: The most reliable method is to inspect the module's code directly. Developers and tech-savvy merchants should search the module's files for hardcoded addresses starting with http:// instead of https://. Key functions to look for include file_get_contents, curl_init, or Tools::file_get_contents, especially when they point to an HTTP endpoint.
  • Browser Developer Tools (with a caveat): While useful for client-side requests, browser developer tools (e.g., Chrome's F12 Network tab) will only show HTTP/HTTPS traffic initiated from the browser. Calls made directly from the server-side PHP code (like curl or file_get_contents) will not appear here.
  • Server-Side File Search: For those with server access, running a comprehensive search across the entire modules directory for http:// references can pinpoint suspicious connections.

Understanding the Risks: Data Privacy and Code Integrity

The community emphasized that unencrypted HTTP connections pose significant risks:

  • Data Interception: Any data sent over plain HTTP can be intercepted and read by malicious actors, potentially exposing sensitive shop information, credentials, or customer data.
  • Data/Code Alteration: Beyond just reading data, an attacker could alter the response. This is particularly dangerous if a module downloads updates over HTTP (a vulnerability known as CWE-494). An altered update could introduce malicious code directly into your PrestaShop store.
  • Timing Matters: While any unencrypted call is a risk, the severity can vary. A call that only happens during module installation or an update check might expose less data than one that pings a developer on every back office page load. However, the risk of code injection during an update remains high.

Actionable Solutions and Best Practices

The thread concluded with clear recommendations:

  • Request HTTPS: If an unencrypted call is identified, the first step is to contact the module developer and request they switch their endpoint to HTTPS.
  • Prioritize Security: Be wary of modules that download updates over HTTP. Always ensure updates are fetched securely.
  • Report Issues: For severe cases involving sensitive data or critical vulnerabilities, consider reporting the issue to the PrestaShop Addons Marketplace or directly to the developer.
  • Evaluate Free Modules: While not all free modules are insecure, exercise caution and perform due diligence, as they might not always adhere to the highest security standards. Andy C eventually revealed the module in question was a free 'Loyalty Points' module from mypresta.eu, which then upsells paid add-ons.

Ultimately, this discussion serves as a vital reminder for all PrestaShop users to be vigilant about module security. Proactive checks and an understanding of how modules communicate can significantly protect your e-commerce store from potential threats.

Start with the tools

Explore migration tools

See options, compare methods, and pick the path that fits your store.

Explore migration tools