Resolution 1718 (unanimously adopted by the UN Security Council on October 14, 2006): - Decides North Korea shall suspend all ballistic missile activities. - Decides North Korea shall abandon all WMD activities.
Resolution 1718’s Principal Sanctions: - Materials and technologies that could contribute to North Korea’s WMD programs and ballistic missile related activities, as set out in prior Security Council documents.
Member states are also required to: - Freeze the funds or financial assets of entities designated by the Security Council as providing support for North Korea’s nuclear, missile, and other WMD program
>> The UN doesn't really have the authority to tell a country what it can and can't do beyond the treaties it has decided to sign
So there are three things at issue here.
First, you carve out sanctions, well, there are sanctions at play here, as above, and the whole point of the document is to alert corporations that they may fall afoul of those sanctions.
Second, does the UN have 'legal authority' for actions like this? Well, yes, actually. Article 25 of the UN Charter stipulates "The Members of the United Nations agree to accept and carry out the decisions of the Security Council in accordance with the present Charter." Becoming a member nation of the UN requires accepting the Charter. Ergo, the DPRK agreed to be bound by decisions made by the security council when it joined the UN as a member nation. Arguing that this is unfair is like saying states shouldn't be bound by federal laws created since their initial joining of the US; no, joining was agreeing to the decisions of the rule making bodies as well. This differs from, say, the TPNW, which is a treaty that the general assembly adopted, and has had some nations who have signed onto, but which does not actually have legal binding even according to the UN's own charter because of that.
Third, does the UN have -enforcement- authority. This is more a pragmatic, rather than legal, concern. And no, it doesn't. It doesn't have a standing army, it isn't in control of any currency, it has no way to enforce a decision if the largest countries don't choose to enforce it for them via some method of coercion. Which is what is happening here; the US accepted the UNSC's decision, and imposed it, and this document is warning that if you don't adhere to that decision within the US' jurisdiction you will be committing a crime that the US will seek to prosecute you for. Which is the context for which "these programs are prohibited" is for.