Skip to content

verifySSN: Area code can be larger than 740 #2970

Description

@jakubsuchy

The United States Social Security Number area code used to startwith a number less than 740 bt this is no longer the case:

https://www.ssa.gov/history/ssn/geocard.html

There are now routinely SSNs with area code larger than 740.

https://github.com/SpiderLabs/ModSecurity/blob/60f802e4801c8a4fee8e2caac90462e53651971f/src/operators/verify_ssn.cc#L103

Activity

  1. martinhsv commented on Sep 19, 2023

    @martinhsv
    Contributor

    Hello @jakubsuchy ,

    My skim of the documents suggests that the U.S. government is still not issuing numbers in the 900s. Should we perhaps consider including that in the if statement (instead of only rejecting '666')?

  2. jakubsuchy commented on Mar 2, 2024

    @jakubsuchy
    Author

    This doc says they now issue those I think: https://www.ssa.gov/employer/randomization.html

    "Previously unassigned area numbers were introduced for assignment excluding area numbers 000, 666 and 900-999."

  3. fzipi commented on Oct 12, 2026

    @fzipi
    Collaborator

    Revisiting this one. Confirmed in both branches: area >= 740 || area == 666 (src/operators/verify_ssn.cc in 3.x, apache2/re_operators.c in 2.x). Since SSN randomisation in 2011 the Social Security Administration assigns all area numbers except 000, 666 and 900-999, so the check should be area == 0 || area == 666 || area >= 900. One-line fix in each branch plus a test; I can open the PRs.

  4. added
    bugIt is a confirmed bug
    2.xRelated to ModSecurity version 2.x
    3.xRelated to ModSecurity version 3.x
    on Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    2.xRelated to ModSecurity version 2.x3.xRelated to ModSecurity version 3.xbugIt is a confirmed bugpr available

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions