Amazon.com Inc. isn’t liable for damages from a house fire seemingly caused by flawed batteries in a headlamp purchased on its site from a third-party seller.

The online retail giant isn’t a “seller” under Maryland law because it never took title to the headlamp, but merely “fulfilled” the transaction by storing and shipping it, the U.S. Court of Appeals for the Fourth Circuit said May 22.

The three-judge panel ruling was unanimous but one judge wrote separately suggesting Maryland could consider updating its product liability law to account for online purchases.

Other courts have also declined to find liability against...