It very likely happened with your permission as avast doesn’t just change the search engine. I’ve never seen it do so since 2009(!)
Did you ran a scan before it happened ? If so, what exact scan ?