According to security researcher Charlie Miller, Apple (NASDAQ:AAPL) may have fumbled with its latest iPhone.

"They messed up," Miller, an analyst at Independent Security Evaluators (ISE), told ComputerWorld. He's referring to a Mac OS X bug that was found months ago, yet wasn't patched on the iPhone until a week ago, with the release of the new 3G model and the 2.0 version of the iPhone software.

"For three months, I was walking around with a vulnerable iPhone," Miller continued. "They had the vulnerability and the exploit, they understood the exploit because they patched it on Mac OS X, but then they said that they didn't know that [the iPhone] was vulnerable."

How big a gaffe is this? Big enough -- though, honestly, I think it's more carelessness on Apple's part than stupidity. Miller is right; Mr. Mac's coders immediately went to work plugging the OS X hole he found in March. As ComputerWorld reports, the trouble didn't start until after Apple asked Miller whether the bug could wend its way into the iPhone's version of the Safari Web browser. Miller didn't know, and since he was traveling in Canada at the time, he didn't expand his testing. Apple apparently failed to investigate further.

Luckily, there have been apparantly no reports of an iPhone-enabled security breach. Still, of 13 known iPhone security holes filled last week, ComputerWorld says that Apple addressed every one in Mac OS X updates between March and June. But while Mac users were safe, iPhone users weren't.

That's just awful.

Apple is playing, and winning, the business equivalent of a high-stakes poker game. Great cards (read: the iPod, the iPhone, and new iMacs) have been flowing its way. Every bet is paying off. Our Stock Advisor subscribers, many of whom owned shares of Apple before David Gardner recommended the stock in the February issue, couldn't be happier.

Yet the central truth of poker -- that one ill-conceived and poorly timed bet can kill you -- applies here, too. Unpatched security flaws? That sounds way too much like the Microsoft (NASDAQ:MSFT) of 10 years ago.

Where does the iEmpire get off being lazy at the time of its maximum opportunity? Dell (NASDAQ:DELL), once a mortal threat, is in retreat. Research In Motion (NASDAQ:RIMM), and Nokia (NYSE:NOK) are all but imitating the iPhone.

This is the time for Apple to be at its best. It's the least its investors deserve.

Further fully secure Foolishness:

Apple is a Stock Advisor selection. Dell and Microsoft are Inside Value picks. Try either of these market-beating services free for 30 days. There's no obligation to subscribe.

Fool contributor Tim Beyers owned shares of Nokia at time of publication. Tim is a member of the Rule Breakers team and the proud owner of a MacBook Pro, which he used to write this article. The Motley Fool's disclosure policy ran security for underground card club a few years back.