# Melhor Envio <= 3.0.7 - Authenticated (Contributor+) Missing Authorization to Plugin Mode Change

- **ID:** WPSEC-2026-1971
- **Plugin:** Melhor Envio (`melhor-envio-cotacao`), https://wordpress.org/plugins/melhor-envio-cotacao/
- **Affected versions:** from 3.0.6 before 3.0.8
- **Fixed in:** 3.0.8 (Update to 3.0.8 or later.)
- **Severity:** Medium 4.3 (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N)
- **Weakness:** CWE-862
- **Usage among sites WPSec scans:** plugin Low, affected versions None seen (as of 2026-10-29)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/melhor-envio-cotacao
- **Fix released:** 2026-10-28
- **Published:** 2026-10-29
- **URL:** https://wpsec.com/vuln/WPSEC-2026-1971/

## Description

The Melhor Envio plugin for WordPress is vulnerable to unauthorized modification of data in versions 3.0.6 up to, and including, 3.0.7 due to a missing capability check on the 'melhor_envio_set_mode' admin-post handler (ModeNoticeController::handleModeSwitch). The handler only checks a nonce, and that nonce is printed on every wp-admin page to any logged-in user who can open the dashboard, both in the plugin's migration notice and in the inline 'wpApiSettingsMelhorEnvio' script. This makes it possible for authenticated attackers, with Contributor-level access and above, to switch the plugin between legacy and Melhor Integrador mode, which changes the shipping methods the store offers.

## References

- https://wpsec.com/vuln/WPSEC-2026-1971/
- https://plugins.svn.wordpress.org/melhor-envio-cotacao/tags/3.0.8/
- https://wordpress.org/plugins/melhor-envio-cotacao/

Source: WPSec, https://wpsec.com/vuln/WPSEC-2026-1971/

License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Free to use, share and adapt, also commercially, if you credit WPSec and link to this advisory.
