Supposedly, the subway train is in Boston (on the MBTA) and is a Yellow Line train. The MBTA subway system has no yellow line, having only Red, Orange, Green, and Blue lines. Where the fictitious map shows the Yellow Line running is in fact the path of the Orange Line, but the Orange Line stops have different names than those provided for the show.
Several of the CSI detectives (e.g. Elijah Mundo and Simon Sifter) repeatedly call the crash an "accident" throughout the episode, even though they all agree they are looking for a perpetrator (obviously, an accident has no perpetrator). They even keep calling it an accident after Avery Ryan stated that the perpetrator had to be smart and persistent in order to carry out the attack.
Subway trains run on electric power. All they had to do to prevent the hacker from crashing a subway train in Boston was cut the power on the subway system until they found the hacker's device. Without power to run the trains the hacker couldn't crash any of them.