Pope Pius XII
Humani Generis §39
Humani Generis: Concerning Some False Opinions Threatening to Undermine the Foundations of Catholic Doctrine
39 Therefore, whatever of the popular narrations have been inserted into the Sacred Scriptures must in no way be considered on a par with myths or other such things, which are more the product of an extravagant imagination than of that striving for truth and simplicity which in the Sacred Books, also of the Old Testament, is so apparent that our ancient sacred writers must be admitted to be clearly superior to the ancient profane writers.
Source: Humani Generis (Vatican.va)