Star Trek: 10 Starfleet Rules You Never Knew Existed
8. Patient Transfer Procedures
An unnamed Starfleet protocol stated that 'the transfer of a patient is to be performed at the discretion of the attending physician.' This may seem like a pretty common sense rule, but it's easy to exploit.
In the first alternate universe film, Dr McCoy purposefully infected Kirk with a vaccine for a Melvaran mud flea bite, giving him the symptoms. Once Kirk was infected, McCoy was able to take him aboard the Enterprise simply by declaring himself Kirk's 'attending physician'.
No questions were raised as to why a victim of Melvaran mud fleas would need to be taken aboard a vessel that was responding to a distress call from Vulcan. Apparently, no explanation was even required. And the fact that McCoy thought of this loophole so quickly really suggests that he'd done this before, or at least thought about it, which raises a ton of security concerns.