This isn't a security issue related to self-hosting, it's a security issue related to use and it is shared entirely by closed weights models. Anthropic could easily be sneaking bugs into your generated code, too.