Unmanned aerial vehicles (UAVs) have attracted significant attention due to its emergent importance in a wide range of applications, including military and civil areas. Teal Group???s market studies estimate that investments in UAVs will be expanded from $6.4 bi in 2014 to $91 bi in 2024 between military and non-military expenditures. However, only a little amount has been invested in the reliability and security of UAVs. From a technical point of view, UAVs are highly exposed systems, multiply linked, consisting of complex pieces of hardware with high strategic and economic value. The classical UAV control design aims to obtain controllers that tolerate and compensate exogenous perturbations, e.g., wind turbulence and terrain disturbances, but they are unable to ensure the desired performance if a sensor or actuator fault occurs or when the UAV is victim of a cyber-attack. Thus, the main objective of this PhD research is to automatically detect and repair software vulnerabilities in UAVs using fuzzing and symbolic execution techniques. In particular, this PhD research aims to (1) automatically localise faults related to various security vulnerabilities such as buffer overflow, zero-day vulnerabilities and crash reproduction using existing symbolic execution and fuzzing techniques; (2) propose repairs using state-of-the-art program synthesisers, which are built on top of efficient symbolic execution engines, in order to analyse a buggy program against a set of selected tests to infer the specification of the intended system behaviour; and (3) produce patches that can automatically fix bugs related to software vulnerabilities in order to contribute to the vision of self-healing UAV software.