The answer to your question is rather opinion based and very much depends on your personal behaviour. Meanwhile, few people who have actually traveled to Iran will call it 'unsafe', though of course Afghanistan and Pakistan can be quite volatile.

Plenty of people make this journey. Tony Wheeler and his wife, founders of Lonely Planet, are a well known example, who, if my memory serves me well, wrote their first guidebook on exactly this journey.

As anyone who has made this journey will tell you, it is very doable, with the most 'risky' section probably being south western Pakistan. More so if you need to rely on public transport. More so if, indeed, you are a woman traveling alone.

Then, there are other questions on SE that you should read; [1][1], [2][2].

Finally, if you want to avoid Pakistan altogether, you're going to have a hard time, with your only real option being going around Tibet, and thus through China, meaning either going through central Asia or through Russia, the former adding a bureaucratic challenge, the latter adding many thousands of kilometres to your journey (even if it would be a rather awesome journey).


  [1]: https://travel.stackexchange.com/questions/3532/what-is-a-safe-overland-route-from-europe-to-india-using-public-transport?rq=1
  [2]: https://travel.stackexchange.com/questions/9451/is-there-an-overland-route-to-kashmir-from-europe?rq=1