

Hi,
Yes, it is possible to upgrade a Wazuh agent from 4.3.9 to 4.12.0 remotely from the Wazuh dashboard or manager. However, based on the errors:
ERROR: Error verifying WPK certificate.
ERROR: (8139): At unsign(): Could not unsign package file
ERROR: (8131): Could not verify signature
Failed upgrades: Agent 206 status: Send lock restart error
This appears to be the known issue related to WPK package signing certificates.
There is a similar issue that confirms the WPK packages for some releases were signed with certificates that later expired. As a result, agents reject the package during signature verification, producing the same Could not verify signature error.
As an immediate workaround, you can temporarily disable WPK CA verification on the manager by adding the following to /var/ossec/etc/ossec.conf:
<agent-upgrade>
<ca_verification>
<enabled>no</enabled>
</ca_verification>
</agent-upgrade>
Then restart the manager:
sudo systemctl restart wazuh-manager
Please note that this should only be used as a temporary workaround, as it disables signature verification.
Additionally, you can also remote upgrades through the REST API instead of the CLI. https://documentation.wazuh.com/current/user-manual/agent/agent-management/remote-upgrading/upgrading-agent.html
The following documentation may also be helpful:
Remote upgrading agents: https://documentation.wazuh.com/current/user-manual/agent/agent-management/remote-upgrading/index.html
agent-upgrade (ca_verification): https://documentation.wazuh.com/current/user-manual/reference/ossec-conf/agent-upgrade.html