Is oil-by-rail boom an accident waiting to happen? Tick, tick, tick. The countdown to another rail accident is already on. A 90-car derailment last week in Alabama is only the latest in a series of train wrecks unfolding across North America. The next one, as promised by a dangerous combination of lax regulations and booming traffic, is just around the bend. Fracking may be paving the way towards energy independence for North America, but that doesn't mean Big Oil has the infrastructure in place to move all that new oil around the continent. Whether British Columbians on the Pacific coast or Nebraskans in the corn belt, the public doesn't want new pipelines running through their backyards. Rail, of course, has come to the rescue, regaining a prominence for the oil industry that it hasn't enjoyed since early last century. The number of barrels being moved by rail has soared on both sides of the border. The extra traffic has certainly been a boon for the bottom line of railways. Investors in rail stocks, though, would be wise to take a long look at whether the good times will keep rolling. At first blush, the immediate prospects certainly appear bright enough. In North Dakota, home of the prolific Bakken light oil play, workers are scurrying to build as many as 20 terminals that will eventually allow more than half-a-million barrels a day to move by rail. In Canada, rail shipments have nearly tripled since the beginning of the year to 175,000 barrels a day. What's more, moving oil-by-rail in this country may still be in the early innings. Plans are afoot to build three rail-loading terminals in western Canada with a combined capacity of 350,000 barrels a day. Exxon, meanwhile, is also musing about building its own rail terminal in Edmonton to handle production from its massive Kearl oil sands project. All together, the planned construction of new terminals could mean as much as 900,000 barrels of oil are moved by rail in Canada in the coming years. That volume, as might be expected, roughly equals the capacity of the proposed Keystone XL pipeline. While the rail terminals will be new, the tanker cars doing the hauling will not. Much of the oil moved around the U.S. and Canada is shipped via an aging tanker model known as the DOT-111. These cars, the subject of repeated warnings from the U.S. National Transportation Safety Board, have a thin metal skin that's easily punctured in the event of a derailment. Railways themselves don't own the tanker cars, they just hitch their locomotives to a train of leased cars and away they go. The shale oil boom has been great for third-party vendors such as Procor Ltd. in Canada and Union Tank Car in the U.S. As an aside, both outfits are owned by Berkshire Hathaway, Warren Buffett's holding company, which is seeing big bets on rail pay off, such as buying Burlington Northern Sante Fe in 2010. Rail companies are busy leasing as many tanker cars as they can, even as questions are still being asked about the recent derailments in Alberta and Alabama. Thanks to booming oil traffic, though, railway profits are up. At CN, third-quarter earnings beat expectations, setting the stage for a stock split. According to chief executive Claude Mongeau, CN sees oil playing an even bigger role in the future. Not to be outdone by its rival, CP Rail has moved 45 million barrels of oil on 65,000 carloads through the third quarter and expects to haul upwards of 90,000 carloads by year-end. In all the excitement over rising share prices and short-term profits, shareholders shouldn't lose sight of the potential liabilities, both on the balance sheet and in the real world. As more oil gets moved around North America, more accidents will surely follow. We can only hope none of them are on the tragic scale of Lac-Mégantic. At the moment, regulators are scrambling to wrap their arms around the boom in rail traffic, but they'll eventually catch up. Any new pipelines, too, would similarly take the bloom off the rose for railways. Oil-by-rail may be pushing rail stocks higher for now, but the risks are becoming clearer with every new accident. Jeff Rubin is a former chief economist of CIBC World Markets and the author of the award-winning Why Your World Is About To Get A Whole Lot Smaller as well as The End of Growth.