Live vessel tracking websites can be used to find the location, speed and route of Royal Navy and Nato vessels.
The transponders are commonly used when manoeuvring in and out of port and switched off while at sea or on active operation, but the trackers, similar to those used to monitor commercial aircraft, could leave the vessels vulnerable, it is feared.
The warning follows the release of data by running app Strava, which inadvertently highlighted the position of secret military bases by tracking soldiers' movements.
Commercial vessels such as cruise ships and tankers routinely use an automatic identification system (AIS) to alert other boats to their position. The tracking system is a useful tool in preventing collisions at sea.
But the use of AIS on military vessels is far less widespread and many nations – such as China – shun them entirely.
The Independent was able to trace HMS Ramsey, a mine hunter craft, as it manoeuvred close to the Faslane nuclear base on the River Clyde in Scotland.
A Dutch-registered Nato warship was also observed sailing close to the UK while the helicopter carrier and assault ship HMS Ocean was spotted in the Channel.
Labour peer and former head of the Royal Navy, Lord West, said Western militaries may have become “too transparent”.
Speaking to The Independent, he warned that Britain’s adversaries were likely to be harvesting the information, adding: “I'm sure they look at it.
“Personally I would not put that data out there, but I don't think it is a threat.
“In some ways we have become too transparent [with our locational data]. But it could even be a good thing. People who rely on this data would be completely confused when you turn the AIS off.”
A Ministry of Defence (MoD) source said the navy was “very aware” of the risk that maritime tracking devices pose and had “strong policies in place to mitigate it”.
Chronis Kapalidis, an international security expert at the Chatham House think tank, said the information risked “making the jobs of criminals and terrorists much easier”.
But he added that the most pressing maritime security concern related to passenger vessels in the Mediterranean, which he said were vulnerable to a terror attack.
The former naval officer said: “There is a reason many warships have AIS on even if they are not obliged to do so - to establish maritime presence.
“When they stop operations and visit a port in Oman and Dubai, for example, they turn on AIS. It could be a way of attracting terrorists or pirates as the ship would be more vulnerable closer to shore [which is when AIS is usually switched on].
“It is certainly a consideration, but the ships have internal processes for dealing with it.”
Steffan Watkins, a Canadian security analyst who regularly uses maritime trackers, said the public release of AIS data would have a limited impact on operational safety.
“The vast majority of military vessels have AIS off, but they're still being tracked by space-borne sensors, undersea sensors, and other technical means,” he told The Independent.
“AIS is not required by the navies of the world to track their opposing forces, but it does help in a limited fashion, which is why Nato warships that frequently have AIS on when entering or exiting port turn AIS off when stalking Russian Navy vessels.”
Guidance for US vessels changed last year after a spate of collisions involving American warships.
After the chief of US naval operations, Admiral John Richardson, admitted last year collisions involving two warships which cost the lives of 17 sailors were preventable, a review recommended that ships routinely transmit their positions using AIS to prevent collisions while entering and leaving harbour.
A Nato official said the organisation was "fully aware of commercially available maritime trackers" while a spokesperson for the MoD said it took “the security of its personnel, assets and establishments very seriously and keeps them under constant review".
More about: app