EXHIBIT 23
CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM

We hereby consent to the incorporation by reference in the Registration Statement on Form S-8 (No. 333-42068) of The Goldman Sachs Group, Inc. of our report dated June 12, 2025 relating to the financial statements and supplemental schedules of The Goldman Sachs 401(k) Plan, which appears in this Form 11-K.

/s/ PricewaterhouseCoopers LLP

New York, New York
June 12, 2025