I saw this late 1980's(?) movie in the mid/late 1990s when I was only young, so sorry for the lack of details.
I remember there was a main character - man, some sort of a junkie. There was also a worm. Maggot. He would get inside man's head, make him hallucinate and, I think, do some terrible stuff. The guy had the addiction from the worm but also tried to fight him somehow.
Movie had this dark, gloomy, terminator-ish atmosphere.