National security fears present Obama with a wild card: NBC-WSJ poll

61% say strike ISIS in Iraq and Syria: Poll   

Rising alarm about national security has taken a toll on President Barack Obama but now provides him a rare opportunity to alter his standing, a new NBC News-Wall Street Journal poll has shown.

In the wake of two gruesome videos in which Islamic extremists beheaded American journalists, a 47 percent plurality of voters say the country is now less safe than before the 9/11 attacks. That's up from 28 percent a year ago, a span in which Obama's approval rating dipped to 40 percent from 45 percent. Just 32 percent approve of the president's handling of foreign policy.

President Barack Obama
Jim Watson | AFP | Getty Images
President Barack Obama

In turn, however, Obama now has an opportunity to calm those jitters as he prepares to address the nation Wednesday night on his new strategy for defeating the self-declared "Islamic State" in Iraq and Syria through U.S. airstrikes and support from allies on the ground.

"Presidential leadership on a national security issue, at a minimum, might be able to strengthen him with some of his core voters," said Bill McInturff, the Republican pollster who helps direct the NBC/WSJ survey. His Democratic counterpart Peter Hart added, "For a president who's perceived as a soft leader, this is a moment he could be perceived as a solid and strong leader."

What provides that opening is the extraordinary attention the murders of journalists James Foley and Steven Sotloff have received. Fully 94 percent of Americans said they've seen news coverage of the murders; 59 percent said they've seen "a lot."

Read MoreSetbacks, home and abroad, hurt Obama's standing: NBC-WSJ poll

That explains why 61 percent now say that military action against the Islamic State in both Iraq and Syria is in America's national interest. A year ago, asked if U.S. military action in the Syrian civil war was in America's national interest, just 21 percent said yes.

Some 34 percent say that should even include combat troops, as well as airstrikes. Just 1 in 7 Americans now oppose military action of any kind.

As a result, conflict in the Middle East suddenly represents a new wild card in midterm elections, eight years after discontent with President George W. Bush and the war in Iraq fueled Democrats' unexpected takeover of both the House and Senate.

Republicans regained the House in 2010 and are expected to hold it again in November. If they pick up six Senate seats, Republicans can recapture the Senate as well for the final two years of Obama's tenure.

Overall, the poll shows Republicans in a strong position. By 45 percent to 43 percent, registered voters want Republicans to control Congress after November. Their advantage is larger among voters most interested in the elections, and voters in key battleground states.

Read MoreObama stalls on immigration reform

Limiting the Democrats' vulnerability for now is their 7 point edge, 47 percent to 40 percent, among women voters. Republicans lead among men by 12 percentage points.

Two of 3 voters still say domestic issues will be most important in their vote. And the poll shows those issues as a mixed bag for the two parties.

By 27 percent to 20 percent, more voters expect the economy to get better in the next year than to get worse; half expect economic conditions to remain about the same. Overall opinion on the new health-care law remains negative by a similar margin to a year ago; 34 percent call it a good idea, 48 percent a bad idea.

Voters express more confidence in Democrats for "looking out for the interests of women" (by 28 percentage points), protecting the environment (27 points), dealing with abortion (15 points) and health care (8 points).

In a potential political opening for Obama, voters by 59 percent to 32 percent say Congress should discourage and punish companies for merging with foreign partners for purposes of lower their corporate tax bill. With congressional action not expected soon, Obama has pledged to take steps on his own to limit such "tax inversions."

Read MoreCongress returns: For what?

But opinion has swung Republicans' way on immigration, which explains why President Obama has deferred executive action to provide legal status for some undocumented residents until after the election. The GOP now holds a 7 percentage point edge amid rising unease about border security in the wake of the crisis with migrant children on America's southern border.

On other key issues, voters say they prefer Republicans on taxes (by 4 percentage points), immigration (7 points), the economy (10 points), foreign policy (18 points) and national defense (38 points).

What remains unclear is whether widespread voter unhappiness—67 percent of voters call the country "on the wrong track"—will lead to a broad surge in election turnout by either party. Fully 53 percent of those surveyed agreed with the statement that "no matter the result, Washington will stay pretty much the same."

Read MoreThe 'poorest' members of Congress

The telephone survey of 1,000 registered voters, conducted Sept. 3-7, carries a margin for error of 3.1 percentage points.

—By CNBC's John Harwood