Malvertising (a portmanteau of “malicious software (malware) advertising”) is the use of online advertising to spread malware.
It typically involves injecting malicious or malware-laden advertisements into legitimate online advertising networks and webpages.
Because advertising content can be inserted into high-profile and reputable websites, malvertising provides malefactors an opportunity to push their attacks to web users who might not otherwise see the ads, due to firewalls, more safety precautions, or the like.
Malvertising is “attractive to attackers because they ‘can be easily spread across a large number of legitimate websites without directly compromising those websites’.”
https://en.wikipedia.org/wiki/Malvertising?wprov=sfla1