Investors do not have to look far for signs that artificial intelligence (AI) capital spending is still ramping. This week, OpenAI, Oracle (ORCL -1.94%), and SoftBank announced five additional U.S. data center sites under the Stargate program, pushing planned capacity close to 7 gigawatts and more than $400 billion of investment over the next three years.

Separately, CoreWeave (CRWV 12.90%) disclosed another multibillion-dollar OpenAI contract. The spending backdrop remains extraordinary -- and it is creating potential winning investments in the AI space.

With this in mind, two stocks stand out as direct beneficiaries of rising AI infrastructure demand: CoreWeave and Oracle. Both are tied to expanding GPU capacity and AI workloads -- one as a pure-play AI cloud company, the other as a scaled enterprise platform whose cloud infrastructure is suddenly in high demand. The opportunity looks real. But so do the risks.

A room full of computer servers.

Image source: Getty Images.

CoreWeave: Pure-play exposure with concentration risk

CoreWeave's latest quarter showed how quickly this AI cloud upstart is scaling. In the company's second quarter of 2025, revenue jumped to about $1.21 billion from $395 million a year ago. Management reported a $30.1 billion revenue backlog and highlighted wins across AI labs and enterprises, while noting it had roughly 470 megawatts of active power and 2.2 gigawatts contracted.

The company's commercial ties to OpenAI deepened again on Thursday. After an $11.9 billion agreement in March and a $4 billion expansion in May, CoreWeave announced a further expansion "by up to $6.5 billion," bringing 2025's total OpenAI contract value to roughly $22.4 billion. That is meaningful demand visibility if the deployments proceed as planned.

There are important caveats. CoreWeave remains unprofitable on a GAAP basis, with a second-quarter net loss of about $291 million driven in part by heavy interest expense. Sure, adjusted EBITDA was strong, but investors should understand the gap between GAAP losses and non-GAAP profitability.

Customer concentration is also a risk, as OpenAI is a growing portion of the backlog, and the buildout requires significant ongoing capital. Shares have been volatile since its March IPO; given the company's early-stage nature and contract concentration, keeping any investment in this stock small to account for the risks is key.

Oracle: Scale, backlog, and a rich valuation

Oracle's cloud story has shifted from an AI laggard to a major AI beneficiary. In its first quarter of fiscal 2026 (the three-month period ending Aug. 31), total revenue rose 12% year over year to $14.9 billion, while cloud revenue climbed 28% to $7.2 billion. Within that, cloud infrastructure (OCI) revenue grew 55% to $3.3 billion. But the headline number was remaining performance obligations (RPO): $455 billion, up 359% year over year, reflecting several multibillion-dollar agreements signed in the quarter.

"We signed four multibillion-dollar contracts," CEO Safra Catz said in the earnings release. Additionally, she noted that "RPO is likely to exceed half-a-trillion dollars."

Oracle Chairman and Chief Technology Officer Larry Ellison highlighted surging multicloud database revenue and previewed an "Oracle AI Database" announcement next month.

And the strategic tie-ins are getting larger. OpenAI said on Tuesday that its Oracle partnership adds 4.5 gigawatts of additional Stargate capacity. And the two -- along with SoftBank -- just unveiled five new U.S. data center sites that push the initiative toward its 10-gigawatt target. If AI infrastructure rolls out on schedule, OCI consumption could rise for years as projects come online.

But the stock's valuation may already be pricing in big expectations. Oracle shares have surged in 2025 and now fetch a valuation of about 67 times earnings -- far above the company's recent historical range -- which leaves little room for execution missteps. The backlog is impressive, yet converting it into profitable, on-time capacity requires steady access to GPUs, power, and real estate, alongside massive capital expenditures.

These are still risky bets

If AI spending keeps accelerating, CoreWeave and Oracle both look poised to benefit. CoreWeave offers direct exposure to training capacity with marquee contracts and rapid top-line growth -- but with customer concentration, GAAP losses, and capital intensity that could bite if deployments slip. Oracle brings scale, enterprise relationships, and a ballooning backlog tied to AI workloads -- but at a valuation that already prices in years of strong execution.

For investors who want to lean into an AI capex boom, both stocks can make sense as small positions within a diversified portfolio. But it's likely wise to size them modestly, monitoring contract flow and capacity buildouts. If the spending cycle delivers as planned, either (or both) could reward patience over time. If it stumbles, investors will be happy they kept their bets small.