{"id":"MSF-unix--smtp--cisco_secure_email_gateway_amp_file_write_rce","name":"Cisco Secure Email Gateway AMP Arbitrary File Write RCE","description":"An unauthenticated attacker sends an email containing a crafted tar attachment through Cisco Secure Email Gateway. Inside the tar, a POSIX pax extended header applies `linkpath=bin/core_watch.sh` to a hard-link member. That member also contains the module's shell command launcher. AMP File Reputation decodes the email attachment and passes the tar to `libunarchv`, AMP's native archive extractor. `libunarchv` runs as root and uses libarchive to write archive members. Its `update_full_pathname()` function replaces the member pathname in `archive_entry_pathname()` with a generated pathname in AMP's temporary extraction directory. It leaves `archive_entry_hardlink()`, which holds the pax `linkpath`, under the attacker's control. Libarchive asks the operating system to create the generated pathname as a hard link to `bin/core_watch.sh`. AMP's working directory is `/data`, so this relative `linkpath` resolves to `/data/bin/core_watch.sh`. A hard link is another pathname for the same file. When libarchive writes the member's data through the generated pathname, it therefore truncates and replaces `core_watch.sh`. This primitive overwrites an existing file; it cannot create the file named by `linkpath`, and both pathnames must be on the same filesystem. The flaw is in `libunarchv`'s hard-link validation, not the pax format. The module uses the file overwrite to replace /data/bin/core_watch.sh with a shell command launcher. The system crontab runs this script as root every five minutes. Before running the payload, the launcher truncates the replaced file to prevent another payload execution. Three other Cisco scripts are hard links to the same file and are also left empty. The appliance requires repair after exploitation. The check sends the hidden EUQ_FULL SMTP command to identify an AsyncOS mail service. SMTP does not reveal the Content Scanner Tools version or whether File Reputation is enabled on a mail policy, so the check reports only that the product was detected. File Reputation must be enabled and assigned to a mail policy, and Content Scanner Tools must be earlier than 25.3.0.5525.","cves":["CVE-2026-76519"],"author":"sfewer-r7","published":"2026-10-14","platform":"Unix","type":"remote","language":"Ruby","source":"metasploit","sourceUrl":"https://github.com/rapid7/metasploit-framework/blob/90dfbaa741421d0179f9f371109c215d49400444/modules/exploits/unix/smtp/cisco_secure_email_gateway_amp_file_write_rce.rb","path":"modules/exploits/unix/smtp/cisco_secure_email_gateway_amp_file_write_rce.rb","revision":"90dfbaa741421d0179f9f371109c215d49400444","filename":"cisco_secure_email_gateway_amp_file_write_rce.rb","vulnerabilities":[{"id":"CVE-2026-76519","state":"PUBLISHED","title":"Cisco Secure Email Gateway Arbitrary File Write Vulnerability","titleSource":"CVE Program","description":"A vulnerability in the Advanced Malware Protection (AMP) feature of Cisco Secure Email Gateway could allow an unauthenticated, remote attacker to write arbitrary files on the underlying operating system. This vulnerability is due to improper handling of email attachments when the file reputation service is enabled. An attacker could exploit this vulnerability by sending an email that contains a crafted attachment through an affected device. A successful exploit could allow the attacker to write arbitrary files and execute commands with&nbsp;root privileges on the underlying operating system.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2026-76519","cvss":{"version":"3.1","baseScore":9.8,"severity":"critical","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","source":"cisco","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-76519"},"updatedAt":"2026-10-15T03:56:57.762Z","retrievedAt":"2026-11-25T16:13:33.706Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/MSF-unix--smtp--cisco_secure_email_gateway_amp_file_write_rce.png?v=2","url":"https://exploitbin.com/exploits/MSF-unix--smtp--cisco_secure_email_gateway_amp_file_write_rce","downloadUrl":"https://exploitbin.com/api/v1/exploits/MSF-unix--smtp--cisco_secure_email_gateway_amp_file_write_rce/download","codeUrl":"https://exploitbin.com/api/v1/exploits/MSF-unix--smtp--cisco_secure_email_gateway_amp_file_write_rce/code","licenseUrl":"https://exploitbin.com/sources#metasploit"}