EX-23.1 4 ef20038948_ex23-1.htm EXHIBIT 23.1

EXHIBIT 23.1

CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM

We consent to the incorporation by reference in Registration Statements on Form S-3 (No. 333-193011) and Form S-8 (Nos. 333-208053 and 333-283124) of Community Trust Bancorp, Inc. of our reports dated February 28, 2025, on our audits of the consolidated financial statements of Community Trust Bancorp, Inc. as of December 31, 2024 and 2023, and for each of the years in the three-year period ended December 31, 2024, which report is included in this annual report on Form 10-K. We also consent to the incorporation by reference of our report dated February 28, 2025, on our audit of the internal control over financial reporting of Community Trust Bancorp, Inc. as of December 31, 2024, which report is included in this annual report on Form 10-K.

/s/ Forvis Mazars, LLP

Louisville, Kentucky
February 28, 2025