It gets very hot in the attic here.
The Code Police will be around to tell you if it is allowed.
Southwire Type UF-B cable is generally used as feeder to outside post lamps, pumps, and other loads or apparatus fed from a distribution point in an existing building as specified in the National Electrical Code.1 UF-B cable may be used underground, including direct burial. Multiple conductor UF-B cable may be used for interior branch circuit wiring in residential or agricultural buildings at conductor temperatures not to exceed 90°C (with ampacity limited to that for 60°C conductors) as specified by the National Electrical Code. UF-B can be used in applications permitted for NMC in Section 334.10(B) of the National Electrical Code. Voltage rating for UF-B cable is 600 volts.