Not national security, but an arguably reasonable law enforcement target.
It's not rare to read about some teen that is having to register as a sex offender for doing the kind of things teens have been doing for a long time, it's just that now technology keeps the evidence around and accessible.
As soon as the image is sent though, most legislatures consider that pornographic distribution. Here in the UK for instance you could at least be prosecuted under the Obscene Publications Act.
Having such a picture of someone else is also against the letter of the relevant laws even if the subject of the image sent it to you.
Like laws covering the age of consent for explicit sexual activity (which varies between 14 and 21 depending on where you are and sometimes depending on your gender and orientation) it gets more complicated if an image crosses state borders (sender and recipient being in different states/countries). Generally speaking you would find yourself judged against the strictest of the laws involved, not the most lenient, where there is variation.