The UN has gone on the offensive against Saudi Arabia, attacking the kingdom over its treatment of children and demanding an end to laws allowing the stoning, amputation, flogging and execution of children.

The UN's children's rights body has also condemned Saudi Arabia's actions in the war in Yemen. In a report put forward by 18 experts, the commission has said airstrikes purportedly targeting Houthi rebels in Yemen have killed and maimed hundreds of children.

The Committee on the Rights of the Child also said Saudi Arabia has used starvation as a weapon in its war against the Iran-backed Houthi group, Reuters reported.

Saudi Arabia should "unambiguously prohibit the use of solitary confinement, life sentences on children and child attendance of public execution," the report said.

It added that children older than 15 are tried as adults and can be executed. At least four people executed in January this year, in the largest such mass execution in decades, were under the age of 18.

Saudi Arabia was urged to "repeal all provisions contained in legislation which authorise the stoning, amputation and flogging of children" and "unambiguously prohibit the use of solitary confinement, life sentences on children, and child attendance of public execution".

The UN also found that children in Saudi Arabia are discriminated against on grounds of religion and gender. It said Shia families in the majority Sunni nation, as well as other minorities, are persistently discriminated against in their access to schools and the country's courts.

Riyadh "still does not recognise girls as full subjects of rights and continues to severely discriminate [against] them in law and practice and to impose on them a system of male guardianship," the report added.