Recently upgraded to 18.5 on a 200+ TB databases and ran across an odd error that we'd not run across in TEST:
ORA-13831: SQL profile or patch name specified is invalid
We have several SQL Plan Baselines and SQL Profiles in place, mostly of the simple 1 hint sort, so nothing very fancy. Some MOS searching produced this bug reference:
Query with SQL Plan Baseline Fails with 'ORA-13831: SQL profile or patch name specified is invalid' (Doc ID 2360823.1) Bug 27496360 : QUERY WITH PLAN BASELINE FAILS WITH ORA-13831: SQL PROFILE OR PATCH NAME SPECIFI [sic]
In our case we dropped the SQL Profile and baselines for the affected cursor (fortunately there was only one) and recreated the baseline from the SQL Tuning Set we'd captured previously.
Looks like there is a patch 29942554, so if you are planning on an upgrade, make sure it's been applied.
UPDATE:
Based on note: ORA-13831: SQL profile or patch name specified is invalid (Doc ID 2560026.1)
You can also disable and then re-enable the baseline (and presumably a profile) which might be an easy thing to try before dropping and recreating it.