Tens of thousands of families caring for elderly relatives at home could be breaking the law by locking them in for their own safety.
Up to 53,000 people in private homes and supported living arrangements are "deprived of their liberty", according to official estimates, by carers and family members who do not have the correct permission to do so.
Many older people are held by relatives who are concerned that they might wander off and get hurt.
It is currently very costly and time-consuming to apply for formal permission to do this.
This means that hardly any families actually have the correct permission to lock their loved-ones in - and many of them are leaving themselves open to breaking the law.
Families could risk committing the offence of false imprisonment, kidnapping or wilful neglect.
Care homes and hospitals must apply to the local authority for a deprivation of liberty safeguard if they want to keep someone detained.
People caring for another person in a private home can't do this. Instead they have to ask the local authority to apply to the Court of Protection for permission - a time-consuming and emotionally difficult process.
Last year appropriate permission was applied for in just 1,400 cases, according to official figures.
This is a tiny fraction of the 53,000 people the Law Commission estimates are being held in private homes without the knowledge of local authorities.
In a report the body has recommended that the requirement to go to court be removed, and local authorities are allowed to grant permission to carers in private homes directly.
The report found that another 100,000 people were detained last year by care homes and hospitals without the proper checks being followed.
Following a ruling in 2014, hospitals and care homes had to apply to local authorities for permission to keep people with mental health problems and learning disabilities detained for their own safety.
Previously the rules had been less stringent and formal permission was required in a minority of cases.
As a result the number of applications to do this increased from 13,700 in 2013-14 to 195,840 in 2015-16. Less than half of these were actually processed on time - meaning up to 100,000 people were being unlawfully detained.
The recommendations will mean the process is quicker and easier. They will also allow orders to be renewed annually without the need for a new application process.
The new rules will also cover 16 and 17-year old - previously they only applied to adults.
Law Commissioner Nicolas Paines QC said: “It’s not right that people with dementia and learning disabilities are being denied their freedoms unlawfully.
"There are unnecessary costs and backlogs at every turn, and all too often family members are left without the support they need.
“The Deprivation of Liberty Safeguards were designed at a time when considerably fewer people were considered deprived of their liberty.
"Now they are failing those they were set up to protect. The current system needs to be scrapped and replaced right away."