Photo Credit: iStockMore than 310,600 Mercedes-Benz vehicles are being recalled because a door-related defect can stop the automatic parking brake from setting, Cars.com reported. The defect raises the chance that a vehicle could roll after the driver gets out.What happened?Mercedes-Benz said in the safety recall report that it covers model-year 2019 to 2026 vehicles across several lines, including A-Class and C-Class sedans, CLA and CLE coupes, AMG models, and GLA, GLB, and GLC SUVs. The problem traces back to the driver's door lock, where a small internal microswitch may corrode over time and no longer register that the door has been opened, per the report.AdvertisementAdvertisementWhen that signal is missed, the electronic parking brake might not turn on automatically with the driver's door open, leaving drivers thinking the vehicle has secured itself after they stop and step out.Mercedes-Benz plans to mail owner notification letters on Sept. 18. The automaker said in the report it wasn't aware of any cases of rollaway due to the defect in the U.S. The company also noted that it made a change on May 20 to fix the issue in new vehicles.Why does it matter?A vehicle that rolls away can damage nearby cars, hit property, or seriously injure pedestrians and passengers.When a door sensor and parking brake system fail to communicate properly, people may have little warning that their vehicle is less secure than they believe.AdvertisementAdvertisementSince the defect affects more than 310,000 vehicles across multiple model lines, it is anything but an isolated threat. It also adds to a lengthy list of auto recalls this year in the U.S.These struggles aren't limited to one brand or type of vehicle, and point to greater struggles in creating safe, reliable cars in the industry. What's being done?As a remedy, dealers will check the driver's door lock and replace it for owners at no charge when needed, Cars.com noted.Owners with questions can call Mercedes-Benz at 800-367-6372 or reach the National Highway Traffic Safety Administration's vehicle safety hotline at 888-327-4236.AdvertisementAdvertisementA small component inside a driver's door can create a much larger hazard when a parked vehicle no longer stays parked. For now, drivers will have to wait a few months for the fix and be attentive to the parking brake.Get TCD's free newsletters for easy tips, smart advice, and a chance to earn $5,000 toward home upgrades. To see more stories like this one, change your Google preferences here.