A security flaw has been discovered in Open5GS up to 2.7.x. Affected is the function amfnnrftryoldamfdiscoveryfallback of the file src/amf/nnrf-handler.c of the component Old AMF Discovery Fallback. The manipulation of the argument discoveryoption results in use after free. The attack may be performed from remote. The patch is identified as ddd683a35f8aaac2b7b9884a24cd53bddfc65238. Applying a patch is advised to resolve this issue.