Neither can do all that much, especially Iran, when it comes to hurting the US, or even their immediate neighbors. The only real card the DPRK has is their ability to deal massive damage to civilian infrastructure and population in the RoK. Iran has even less to play. The North Korean regime isn't going to risk their existence by sparking a war with the south, over US military action in Iran. Iran has some room to expand activities in the Middle East, to increase their influence in the region but not much. And they're certainly not going to risk their chance to make real gains while the US is busy in North Korea, by attacking US assets and facilities directly.
If the US does get heavily involved in either one of those two what you should look for is an increase in the roles Russia, China, and the EU play in global geopolitics. They will be the ones to profit the most from another US involvement in a messy nation-building exercise.
I see what you are saying and i personally think that you overstate the ability of the international community to hold NK and Iran at bay.
And neither do i see any side getting a benefit out of another armed conflict.
Both regimes (NK & Iran) know perfectly well how to play their game, they will NOT cross the point of no return and have proven that they can bounce back and change things around into their favor.
Now in terms of military both nations are, not capable of achieving a victory in a offensive way, the know that perfectly well.
But in terms of defense, they are more then a match to any western involvement, and neither the US or South Korea are up to the task to successfully run a huge campaign against NK and this same applies for a US vs Iran scenario.
The US does the hardware to do so, but they lack the international support, the money and stamina to achieve a desirable effect without ending up in a long term saturation war.
Short said it will be a very messy situation, and there is no guarantee that the US will achieve what it might set out to do.
So the reason i said you overstate the ability is because one could say both parties keep each other in check, however the US cannot just go in, but both NK and Iran can feel them selfs cornered and put into such a position that a all or nothing war might be the only thing left.
And in that situation specially in a NK vs SK situation it would mean a MASSIVE loss of live, and in that scenario the US fails in protecting South Korea, as the capital and many border cities end up being destroyed, by NK artillery and such.
My point is of the west wants success then perhaps pushing a bit less hard avoids the situation from escalating beyond a PONR scenario.
One must realize that NK is inferior to virtually any military standard, but because of their indoctrination and such a war with SK would be just as devastating to NK as SK, and the US will not be able to avoid another massacre:
According to the data from the U.S. Department of Defense, the United States suffered 33,686 battle deaths, along with 2,830 non-battle deaths during the Korean War and 8,176 missing in action.[218] South Korea reported some 373,599 civilian and 137,899 military deaths.[9] Western sources estimate the PVA suffered about 400,000 killed and 486,000 wounded, while the KPA suffered 215,000 killed and 303,000 wounded.[19]
Data from official Chinese sources, on the other hand, reported that the PVA had suffered 114,000 battle deaths, 34,000 non-battle deaths, 340,000 wounded, 7,600 missing and 21,400 captured during the war. Among those captured, about 14,000 defected to Taiwan while the other 7,110 were repatriated to China.[219] Chinese sources also reported that North Korea had suffered 290,000 casualties, 90,000 captured and a "large" number of civilian deaths.[219] In return, the Chinese and North Koreans estimated that about 390,000 soldiers from United States, 660,000 soldiers from South Korea and 29,000 other UN soldiers were "eliminated" from the battlefield.[219]
Recent scholarship has put the full death toll on all sides at just over 1.2 million
Source wiki
My point here is that neither the international community neither the US or SK for that matter have the luxury of pushing to hard towards NK.
Something needs to be done thats true but there is a fine line between success and a complete war.
And with the current situation going from bad to worse i believe that the international community already has partly lost and its reasonable to assume that history might repeat itself.
You do want to avoid Iran or NK to achieve nuclear weapons, but you also want to avoid the situation where both draw a line into a all or nothing situation.
Push a cat into a tiny corner and you will be surprised how dangerous it might become.
Short said it would render all the previous actions meaningless and it would put NK and Iran into a position where they can bring their old hardware into good use.
Because you can have the best military in the world, but a 1 cent bullet kills just as easy as a 500 dollar laser guided bullet.
There is no question about IF the international community is going to win a conflict.
As there is not a hope in hell that both regimes would survive such a thing.
But in terms of casualties both Iran and specially NK can seriously cross all moral lines and use tactics and options that are far more effective then any option available to US/Western forces) And its my firm believe that NK will try to bring up the casualty numbers as high as they can during a conflict and in that matter their military is VERY up to the task.
And this is why i think that the west should back off a bit, and that the US is being overated in their efforts to contain NK or Iran for that matter.
And even with the Support of China and Russia i do not believe that they in the end will jump in and help a US led campaign (perhaps diplomatically yes)
And i venture to say that perhaps they even might help out NK even if its just to avoid the US coming to close to China, keep in mind the DMZ has served as a buffer between east and west for some years now, and i do not see China to give this up that easy, and rather seeing a NK being destroyed is neither a option.
Just saying the interests by China and Russia in that region is far greater then ANY interest that the US might have.
And that on its own is a very good reason to back off a bit.
Remember that it does not have to be like the first Korean war, but do you remember the Afgan war against the USSR? there you got a prime example of US help changing the outcome of the war, while on a diplomatic level everyone was playing nice...
And this NK situation might be just that... for China and Russia.
Or do you believe i am wrong?