Exhibit 23.1

Consent of Independent Registered Public Accounting Firm

We consent to the incorporation by reference in the Registration Statement (Form S-8) pertaining to the L.B. Foster Company 2022 Equity and Incentive Compensation Plan, as Amended and Restated, and the L.B. Foster Company 2006 Omnibus Incentive Plan, as Amended and Restated, of our reports dated March 6, 2024, with respect to the consolidated financial statements of L.B. Foster Company and the effectiveness of internal control over financial reporting of L.B. Foster Company included in its Annual Report (Form 10-K) for the year ended December 31, 2023, filed with the Securities and Exchange Commission.

/s/ Ernst & Young LLP

Pittsburgh, Pennsylvania

May 23, 2024