Stephen H. Sachs lost his monopoly on the Democratic nomination for attorney general yesterday when two challengers entered the race only five days before the final filing deadline.

Deputy State Attorney General Jon F. Oster, a political novice, and Walter G. Finch, a Baltimore patent attorney, both filed for the job of Maryland's chief law enforcement officer. Until yesterday, Sachs, Maryland's U.S. attorney during the 1960s, was the only Democrat openly seeking the office.

He was encountering antagonism from the state's Old Guard political establishment which has never forgotten Sach's aggressive prosecution of political corruption cases.

Now only Louis Goldstein, state comptroller since 1959, seems to be assured an easy primary victory with no opposition. Goldstein gathered his employes together yesterday in a courtyard outside his office to tell them, and the press, that he would run for reelection and would not run on any of the half-dozen gubernatorial tickets.

The employes applauded as Goldstein told them that he "loved everybody" and saw no reason to choose sides. "Gov. Lee asked me to be on his ticket. So did Attorney General Burch. So did Mr. Venetoulis. I love 'em all. I'm not made at anyone," he said.

The Calvert County Democrat said that he felt he should remain independent so that he could win reelection and bring his 19 years of experience back to the government. He also used his noon-hour rally to flatter his employes. "We don't have a lot of bureaucrats sitting around here. We're all working," he said.

Goldstein closed with what has become his signature phrase: "God bless you all real good." Goldstein, although he has sometimes been controversial, is expected to be easily reelected.

Sachs was expecting an equally easy primary race until yesterday. His main challenge will come from Oster who has served in the attorney general's office for 14 years and is expected to benefit from the strong anti-Sachs sentiment.

Oster, a 45-year old Baltimore resident, is well-regarded in legal circles - as is Sachs. Oster said yesterday that he plans to run as an independent candidate, just as Sachs has done. But Oster's boss, Attorney General Francis Burch, is a gubernatorial candidate and Oster is expected to win both the help of some of Burch's supporters and campaign funds and organizational help from the political clubs in Baltimore.

Finch, an active civic leader in Baltimore, has been memorable but unsuccessful candidate in two races for the U.S. Senate. When he ran in 1974 he hiked across the state, lost 100 pounds and still lost to Sen. Charles McC. Mathias.