Cisco IOS is a monolithic operating system running directly on the hardware while IOS XE is a combination of a linux kernel and a (monolithic) application (IOSd) that runs on top of this kernel. Attacker executing code remotely using system vulnerabilities. It is common type of attack and hard to avoid.
CVE-2018-0151 – Cisco IOS and IOS XE Software Quality of Service Remote Code Execution Vulnerability
CVE-2018-0171 – Cisco IOS and IOS XE Software Smart Install Remote Code Execution Vulnerability
CVE-2018-0150 – Cisco IOS XE Software Static Credential Vulnerability