A perversion of smartphone technology called “stalking apps” — precise, secretive trackings of the movements of cellphone users — is increasingly a matter of national concern, particularly for domestic abuse victims. No less threatening is the routine monitoring of children’s locales and phone habits for commercial purposes while parents are kept in the dark. Stealth apps even stoop to cyber-leering through the now notorious app called Girls Around Me, which allows men to search out women, unbeknown to them, by cross-matching GPS technology with information and photo sites like Facebook.

With these abuses proliferating, the Senate Judiciary Committee this month took a big step to protect the privacy of all cellphone users and close legal loopholes that enable stalking apps. The committee approved a worthy measure sponsored by Senator Al Franken, Democrat of Minnesota, that for the first time would require cellphone companies to obtain a user’s permission to collect location data and sell it or share it with third parties. It also would flatly outlaw creation of stalking apps, applying criminal and civil penalties.

“Right now companies — some legitimate, some sleazy — are collecting your or your child’s location and selling it to ad companies or who knows who else,” Mr. Franken told the committee. He described a constituent who was not aware that her spouse had secretly installed an app on her phone to stalk her movements — and send her text threats along the way — as she went to court for a protection order. It takes mere seconds, the senator said, for an abuser to slip a stalking app into another person’s phone. The need to protect children was echoed in a recent Federal Trade Commission study showing that some of the most popular apps for children engage in commercial phone stalking, with no notification to parents.

Current laws banning stalking and wiretapping lag behind modern communications, with no provision barring companies from marketing a stalking app. One company sells such an app for about $50, and advertised on its site: “Suspect your spouse is cheating? Don’t break the bank by hiring a private investigator.”