The result at the Vallecas stadium left the Madrid-based club eighth on 46 points, two behind seventh-placed Real Betis who host Deportivo La Coruna on Monday.
The teams in fifth and sixth position qualify automatically for the Europa League.
Pamplona-based Osasuna are 15th on 33 points, five above the relegation zone.
Andrija Delibasic headed Vallecano in front in the seventh minute but the home side quickly fell behind after poor defending allowed Raoul Loe to equalise before Alejandro Arribas made it 2-1 in the 13th minute.
Captain Piti scored Vallecano's second, and his 15th in the league this season, in the 57th minute and although his team dominated possession they were unable to find a winner.
Leaders Barcelona can secure a fourth title in five years on Saturday if they win at Athletic Bilbao and second-placed Real Madrid lose at city rivals Atletico in the Madrid derby.
- Sports & Recreation
- Deportivo La Coruna
- Real Betis
- Alejandro Arribas
- Andrija Delibasic