It's a fundamental problem with QR codes, You don't know what it contains until you scan it. I advise caution when scanning any code.
There have been cases where publicly placed codes have been changed, Redirecting users to malicious web sites.
Yes, you are right. Everybody has to be careful---maybe "Redirecting users to malicious web sites" and run a certain harmful program automatically.