Problem/Motivation

Codex identified the following issue:

     The defaults applicator protects $ref file loading with realpath() containment in dev/json_schema_validator/src/
     SchemaDefaultsApplicator.php:560, with a traversal test in dev/json_schema_validator/tests/src/Kernel/
     JsonSchemaValidatorDefaultsTest.php:212. Plain validateJsonSchema() delegates file resolution to Opis, whose resolver maps URL
     paths to files and reads them directly. Current call sites mostly pass enum-controlled schema names, so exposure is low, but
     validate/reject schema names containing .., %, ://, or leading slashes, or use the same contained loader path for plain validation.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

ptmkenny created an issue. See original summary.

  • ptmkenny committed 6a600954 on 1.0.x
    fix: #3605385 Hardening: validateJsonSchema() must check containment
    
    By...
ptmkenny’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.