As always, the short answer is that it depends. Mainly on how they are done and the person doing them. Frankly, this is truly the only way to analyze if a given exercise is safe or not, any exercise can be relatively more safe or unsafe for a given individual for a given set of circumstances. That said, the upright row does tend to be surrounded by its share of unsafe exercise beliefs so lets look at why.
I think the first place I saw it asserted that upright rows were categorically unsafe was in the old 7-Minute Rotator Cuff Solution from Health for Life (a now defunct company that put out a variety of different manuals). And this was based on the mechanics of the movement. Specifically, upright rows put the shoulder in an internally rotated and horizontally abducted position. And this is a potential problem because it puts the shoulder/rotator cuff at risk for impingement. Hence, to avoid shoulder problems, upright rows became one of the big no-no exercises.
But is this strictly true? In my opinion, no and much of it has to do with how the exercise is performed. Certainly, the traditional bodybuilder method of performing the exercise is pretty high risk. Ive shown the typical form below.
High Ouchie Potential
As you can see, the elbows are being brought very high (often the goal is to get them to the ears) and certainly that tends to put the rotator cuff in a high risk position even with excellent shoulder control. As well, you dont really get a whole lot more involvement of the deltoids in the first place by pulling the bar this high. So you increase the risk without really impacting on the movements benefit as a shoulder movement.
So for those reasons, I certainly wouldnt recommend folks do upright rows using that technique. The risk is high and the benefit relatively low. This is especially true given that its easy to modify the movement into one that is not only safer for the shoulder but targets the deltoids just as effectively. And that is to do the movement where you stop with the elbows only going as high as the shoulders themselves (this typically put the weight/bar/dumbbell about sternum level) as shown below.
Less Ouchie Potential
The above has far less potential for impingement issues, simply by limiting the range of motion. Yet it still provides full stimulation for the medial deltoid. Id mention that it does still require some ability to control the scapula (in terms of setting the shoulder down and not letting it elevate) so someone with a previous rotator cuff injury might still have problems with it. But for someone with good scapular control and no other shoulder issues, I see no problem with doing upright rows in this fashion.
As a final note, I would suggest doing the movement either with a rope handle (off a cable stack) or with dumbbells. The wrists tend to get a bit cocked using a barbell so even if the movement doesnt bug your shoulder, it can jack up your wrists. And, of course, if doing upright rows even in the above fashion still bugs your shoulders, drop the movement. As I said up above, movements can only generally be rated as safe or unsafe for a given individual under a given set of circumstances. If a movement causes pain, its not a good one for you.
Hope that clears things up.