depends on the jurisdiction. at least in the us they're not illegal per se.
> U.S. law distinguishes between pornographic images of an actual minor, realistic images that are not of an actual minor, and non-realistic images such as drawings. The latter two categories are legally protected unless found to be obscene, whereas the first does not require a finding of obscenity.
States have obscenity laws that restrict sale and advertisement of this content, but possession cannot be banned by obscenity laws. Think about the mess that would be enforcing this law. You can't objectively determine the age of a fake character, unlike a real person.
It is certainly a mess, but that doesn't stop jurisdictions outside the United States from prosecuting it.