Is exposing the UID a security issue? I noticed that the UID of users is exposed in the HTML code of a page on my site that authenticated users can access.

Is it a problem if authenticated users with "view user profiles" permission are able to find the UID of any non-disabled user account?
According to this post by the Drupal Security Team, it is not considered a vulnerability:

Disclosure of usernames and user ids is not considered a weakness


  Drupal's philosophy
  
  Usernames are an important part of online identity. Having a public username helps other users of a site to know the identity of the person they are interacting with in a forum or a blog. Drupal is primarily intended to be used for sites where identity and interaction are key elements so it is reasonable for that information to be public.


Of course, it will vary by site, depending on what that information allows other users to see.