Abstract: The growing industry of unmanned aerial vehicles (UAV) requires an efficient and robust algorithm to decide the path of the UAV and avoid obstacles. The study of pathfinding algorithms is ongoing research not just useful in the domain of drones, but in other fields like video games (AI pathfinding), terrain traversal (mapped, unmapped, areal, underwater, land, etc.), and industries that require robots to deliver packages. This paper proposes a new pathfinding algorithm that aims to solve the problem of pathfinding in unknown 2-dimensional terrain. Based on a system of assumptions and using the help of a set of sensors aboard the UAV, the algorithm navigates the UAV from a start point to an endpoint while avoiding any shape or size of obstacles in between. To avoid multiple different types of “infinite loop” situations where the UAV gets stuck around an obstacle, a priority-based selector for intermediate destinations is created. The algorithm is found to work effectively when simulated in Gazebo on Robot Operating System (ROS). Keywords: Path Planning, UAV, Obstacle Avoidance, Drone Navigation, Obstacle Detection, Uncharted Environment.