The insulation that burned out of control on Grenfell Tower had never passed the required safety test and should never have been on the building, a BBC investigation has discovered.
Panorama understands the manufacturer, Celotex, used extra fire retardant in the product that qualified for the safety certificate.
A more flammable version was then sold for public use, the programme believes.
Celotex said it is co-operating with the police investigation and inquiry.
The company said it could not comment further but wished to express its deepest sympathies to everyone who was and remains affected by the fire. But it has not denied any of Panorama's allegations.
Panorama also accused Celotex of mis-selling the insulation with misleading marketing.
The programme has been advised that the way Celotex tested and sold the insulation could amount to corporate manslaughter.
Hundreds of buildings
The RS5000 insulation, which was used in the refurbishment of Grenfell, gives off toxic fumes which contain cyanide when it burns. Panorama understands that almost all of the 72 people who died at Grenfell were killed by smoke.
Celotex's plastic foam insulation has been used on hundreds of other buildings around the country.
Fire safety expert Arnold Tarling said he was shocked by the revelation: "Well, words fail me. This is absolutely mind-blowing. This material is all over the place."
The change in formula was not the only problem with the fire safety test that the insulation passed.
The BS8414-2 test only showed RS5000 was safe to use on certain new build projects when it was combined with a specific fire-proof cladding panel.
But Celotex knowingly misled buyers about RS5000.
Its marketing suggested the insulation was suitable for use with other cladding panels and for tower block refurbishment projects like Grenfell. Neither was true.
The company was repeatedly warned that its marketing was misleading, but it carried on mis-selling the product anyway.
Panorama has discovered Celotex targeted the contractors who were refurbishing Grenfell and specifically offered its flammable insulation - even though the company knew it was going to be combined with combustible cladding panels.
Matt Wrack, general secretary of the Fire Brigades Union, said Panorama's allegations should be investigated: "If there are breaches of the law then those people need to be held to account."
Celotex said it wished to express its deepest sympathies to everyone who was and remains affected by the fire.
It said it was co-operating fully with all the inquiries into the Grenfell Tower fire, including the police investigation and the public inquiry.
"We believe that the right forum for considering and assessing the many, complex and inter-related issues which arise in relation to the fire - and which require consideration of the involvement of all relevant parties - is through these official investigations. We do not think it is appropriate to comment any further outside of or in advance of that process."
When Panorama told Celotex that its actions might amount to corporate manslaughter, the company said: "We fully recognise the seriousness of the Grenfell fire. It is for this reason that we believe the public inquiry and the police investigation are the right processes to consider the events leading up to the fire, and the night of the fire itself."
The programme also reveals for the first time that the cladding panels and insulation used at Grenfell were never tested together before the fire.
Robert Bond, chief executive of the main contractor Rydon, tells the programme that testing of the cladding system wasn't required because "it was deemed to comply".
But Panorama understands the company had a legal responsibility to test the system for safety.
Grenfell: Who is to Blame? will be broadcast on BBC One at 20:00 BST on 21 May.