27.2.2023 Ref. 58917/LLJ ID 3673 ____ Lars Lüthjohan Attorney-at-law +45 4028 3536 llj@mazanti.dk | | Registration Statement on Form S-8 of Ascendis Pharma A/S Dear Sirs, We have acted as Danish counsel to Ascendis Pharma A/S (the “Company”) in connection with the Company’s implementation of a Performance Stock Unit Program (“PSU Program”) and grant of Restricted Stock Units and Performance Stock Units under the Company’s RSU Program and PSU Program and the authorisation to the board of directors to grant warrants as set out in article 4f of the Company’s articles of association. In connection with the opinion expressed herein, we have examined such documents, records and matters of law as we have deemed relevant or necessary for purposes of this opinion. Based on the foregoing, and subject to the further limitations, qualifications and assumptions set forth herein, we are of the opinion that: 1. 721,963 ordinary shares that will be granted following the Company’s RSU Program and PSU Program, and that are currently being held as treasury shares, are duly authorised, fully paid and non-assessable; 2. 278,037 ordinary shares that remain available for future grants under the Company’s RSU Program and PSU Program, and that are currently being held as treasury shares, are duly authorised, fully paid and non-assessable; 3. 1,000,000 ordinary shares that may be issued following exercise of the warrants under authorisation to the board of directors as set out in article 4f of the Company’s articles of association on the terms of the incentive scheme set forth in Appendix 1a to the Company’s articles of association or such other terms as the board of directors may determine from time to time (i) have been duly authorised and, (ii) when issued in accordance with the terms of the incentive scheme and against payment of due consideration therefore and the capital increase has been duly registered with the Danish Business Authority in connection herewith, will be validly issued, fully paid and non-assessable. |