Skip to content

integrity rules: oversized style attribute, oversized CSS rule and <base href> still bypass without a signal #1423

Closed

Description

@nc9

Found in review of #1399. These integrity-rule bounds can still be passed with cheap padding and give no signal. Same class as the #784 evasions, left out of that PR.

  • A style attribute is read to 8,192 characters. A hidden decoy <span style="[8.4 KB of a:b;]display:none">x</span> inside a label is read as visible, so no label form contains the phrase.
  • A CSS rule is skipped whole when its body is over 4,000 characters or its selector over 300: .cover{--p:aaaa...4100;position:fixed;...} hides an overlay rule.
  • <base href="https://evil/"> with <a href="/signin">Sign in with Google</a>: destinations resolve against the page URL, never the <base>, so the link looks own-site while the browser sends the visitor off-site (same on main).

Acceptance Criteria

  • A label whose hidden decoy sits after more than 8,192 characters of style attribute still reads the hidden span as hidden, or the control is reported as not fully read
  • A rule with a body over 4,000 characters, or a selector over 300, is either read for the overlay geometry or reported through cssTruncated
  • A link resolved against a <base href> on another host is judged by that host
  • One test per case above fails on the current code and passes with the fix
  • The rule docs state the remaining bounds and the signal each one gives

Activity

  1. added
    size: S
    rules
    security
    on Oct 31, 2026
  2. added theissue type on Oct 31, 2026
  3. nc9 commented on Nov 2, 2026

    @nc9
    ContributorAuthor

    Checked against v0.0.159, which shipped the fix: all five criteria are met. A style attribute is read to 1 MB and counted in controlsUnread above it; a CSS rule body past 256 KB or a selector part past 2,048 characters gives cssTruncated; a <base href> on another host decides where /go, an empty link href and an iframe src resolve (the first base with an href wins; svg, noscript and template bases are ignored); an oversized hidden-class rule gives the hiddenCssTruncated note. The tests fail on the pre-fix code (the 1423 test file failed 20 of 24 on main in review and passes on the release), and 30,000 iframes with a password form and no base take 282 ms, 20,000 <g> plus 80,000 bases 503 ms. Release: https://github.com/squirrelscan/squirrelscan/releases/tag/v0.0.159

    nik

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

    rulessecuritysize: S

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions