diff --git a/stix2patterns/v20/object_validator.py b/stix2patterns/v20/object_validator.py
index 235ee63..72f051c 100644
--- a/stix2patterns/v20/object_validator.py
+++ b/stix2patterns/v20/object_validator.py
@@ -1,4 +1,5 @@
 import re
+import stix2patterns.inspector
 
 HASHES_REGEX = {
     "MD5": (r"^[a-fA-F0-9]{32}$", "MD5"),
@@ -25,14 +26,16 @@ def verify_object(patt_data):
 
     # iterate over observed objects
     for type_name, comp in patt_data.comparisons.items():
-        for expression in comp:
-            if 'hashes' in expression[0]:
-                hash_type = str(expression[0][-1].upper().replace('-', '').
-                                replace("\'", ""))
-                hash_string = str(expression[2].replace("\'", ""))
-                if hash_type in HASHES_REGEX:
-                    if not re.match(HASHES_REGEX[hash_type][0], hash_string):
-                        error_list.append(
-                            msg.format(hash_string, expression[0][-1])
-                        )
+        for obj_path, op, value in comp:
+            if 'hashes' in obj_path:
+                hash_selector = obj_path[-1]
+                if hash_selector is not stix2patterns.inspector.INDEX_STAR:
+                    hash_type = \
+                        hash_selector.upper().replace('-', '').replace("'", "")
+                    hash_string = value.replace("'", "")
+                    if hash_type in HASHES_REGEX:
+                        if not re.match(HASHES_REGEX[hash_type][0], hash_string):
+                            error_list.append(
+                                msg.format(hash_string, hash_selector)
+                            )
     return error_list
diff --git a/stix2patterns/v21/object_validator.py b/stix2patterns/v21/object_validator.py
index 9920862..7558ba5 100644
--- a/stix2patterns/v21/object_validator.py
+++ b/stix2patterns/v21/object_validator.py
@@ -1,4 +1,5 @@
 import re
+import stix2patterns.inspector
 
 HASHES_REGEX = {
     "MD5": (r"^[a-fA-F0-9]{32}$", "MD5"),
@@ -25,14 +26,16 @@ def verify_object(patt_data):
 
     # iterate over observed objects
     for type_name, comp in patt_data.comparisons.items():
-        for expression in comp:
-            if 'hashes' in expression[0]:
-                hash_type = str(expression[0][-1].upper().replace('-', '').
-                                replace("\'", ""))
-                hash_string = str(expression[2].replace("\'", ""))
-                if hash_type in HASHES_REGEX:
-                    if not re.match(HASHES_REGEX[hash_type][0], hash_string):
-                        error_list.append(
-                            msg.format(hash_string, expression[0][-1])
-                        )
+        for obj_path, op, value in comp:
+            if 'hashes' in obj_path:
+                hash_selector = obj_path[-1]
+                if hash_selector is not stix2patterns.inspector.INDEX_STAR:
+                    hash_type = \
+                        hash_selector.upper().replace('-', '').replace("'", "")
+                    hash_string = value.replace("'", "")
+                    if hash_type in HASHES_REGEX:
+                        if not re.match(HASHES_REGEX[hash_type][0], hash_string):
+                            error_list.append(
+                                msg.format(hash_string, hash_selector)
+                            )
     return error_list

Validator raises/crashes on hashes type "wildcard subscription"
Steps to reproduce
------------------
```
$ validate-patterns -v 2.1
Enter a pattern to validate: [file:hashes[*] = '8665c8d477534008b3058b72e2dae8ae']
```

Expected result
---------------
Something like `FAIL: Error found at line 1:... hashes type does not support wildcard subscription`

Actual result
-------------
```
Traceback (most recent call last):
  File "bin/validate-patterns", line 10, in <module>
    sys.exit(main())
  File "lib/python3.6/site-packages/stix2patterns/validator.py", line 91, in main
    tests_passed, err_strings = validate(pattern, args.version, True)
  File "lib/python3.6/site-packages/stix2patterns/validator.py", line 47, in validate
    errs = run_validator(user_input, stix_version)
  File "lib/python3.6/site-packages/stix2patterns/validator.py", line 34, in run_validator
    return run_validator21(pattern, start)
  File "lib/python3.6/site-packages/stix2patterns/v21/validator.py", line 109, in run_validator
    obj_validator_results = object_validator.verify_object(patt_data)
  File "lib/python3.6/site-packages/stix2patterns/v21/object_validator.py", line 29, in verify_object
    hash_type = str(expression[0][-1].upper().replace('-', '').
AttributeError: 'object' object has no attribute 'upper'
```

diff --git a/stix2patterns/test/v20/test_validator.py b/stix2patterns/test/v20/test_validator.py
index 44e0eae..8ddfa65 100644
--- a/stix2patterns/test/v20/test_validator.py
+++ b/stix2patterns/test/v20/test_validator.py
@@ -87,6 +87,7 @@ PASS_CASES = [
     "[foo:bar=1] REPEATS 9 TIMES",
     "[network-traffic:start = '2018-04-20T12:36:24.558Z']",
     "( [(network-traffic:dst_port IN(443,6443,8443) AND network-traffic:src_packets != 0) ])",  # Misplaced whitespace
+    "[file:hashes[*] = '8665c8d477534008b3058b72e2dae8ae']",
 ]
 
 
diff --git a/stix2patterns/test/v21/test_validator.py b/stix2patterns/test/v21/test_validator.py
index 26f9076..d6e2ef5 100644
--- a/stix2patterns/test/v21/test_validator.py
+++ b/stix2patterns/test/v21/test_validator.py
@@ -100,7 +100,8 @@ PASS_CASES = [
     "[network-traffic:src_port = 37020 AND user-account:user_id = 'root'] "
     "START t'2016-06-01T01:30:00.123Z' STOP t'2016-06-01T02:20:00.123Z' OR "
     "[ipv4-addr:value = '192.168.122.83'] "
-    "START t'2016-06-01T03:55:00.123Z' STOP t'2016-06-01T04:30:24.743Z'"
+    "START t'2016-06-01T03:55:00.123Z' STOP t'2016-06-01T04:30:24.743Z'",
+    "[file:hashes[*] = '8665c8d477534008b3058b72e2dae8ae']",
 ]
 
 

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest
apt-get update apt-get install -y gcc
3.9
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
alabaster==0.7.16
antlr4-python3-runtime==4.8
babel==2.17.0
build==1.2.2.post1
bump2version==1.0.1
bumpversion==0.6.0
cachetools==5.5.2
certifi==2025.1.31
cfgv==3.4.0
chardet==5.2.0
charset-normalizer==3.4.1
check-manifest==0.50
colorama==0.4.6
coverage==7.8.0
distlib==0.3.9
docutils==0.21.2
exceptiongroup==1.2.2
filelock==3.18.0
identify==2.6.9
idna==3.10
imagesize==1.4.1
importlib_metadata==8.6.1
iniconfig==2.1.0
Jinja2==3.1.6
MarkupSafe==3.0.2
nodeenv==1.9.1
packaging==24.2
platformdirs==4.3.7
pluggy==1.5.0
pre_commit==4.2.0
Pygments==2.19.1
pyproject-api==1.9.0
pyproject_hooks==1.2.0
pytest==8.3.5
pytest-cov==6.0.0
PyYAML==6.0.2
requests==2.32.3
six==1.17.0
snowballstemmer==2.2.0
Sphinx==7.4.7
sphinx-prompt==1.8.0
sphinxcontrib-applehelp==2.0.0
sphinxcontrib-devhelp==2.0.0
sphinxcontrib-htmlhelp==2.1.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==2.0.0
sphinxcontrib-serializinghtml==2.0.0
-e git+https://github.com/oasis-open/cti-pattern-validator.git@f819fc5c65785c950a2a65f2f8b78cc534ad8872#egg=stix2_patterns
tomli==2.2.1
tox==4.25.0
typing_extensions==4.13.0
urllib3==2.3.0
virtualenv==20.29.3
zipp==3.21.0

name: cti-pattern-validator
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - alabaster==0.7.16
      - antlr4-python3-runtime==4.8
      - babel==2.17.0
      - build==1.2.2.post1
      - bump2version==1.0.1
      - bumpversion==0.6.0
      - cachetools==5.5.2
      - certifi==2025.1.31
      - cfgv==3.4.0
      - chardet==5.2.0
      - charset-normalizer==3.4.1
      - check-manifest==0.50
      - colorama==0.4.6
      - coverage==7.8.0
      - distlib==0.3.9
      - docutils==0.21.2
      - exceptiongroup==1.2.2
      - filelock==3.18.0
      - identify==2.6.9
      - idna==3.10
      - imagesize==1.4.1
      - importlib-metadata==8.6.1
      - iniconfig==2.1.0
      - jinja2==3.1.6
      - markupsafe==3.0.2
      - nodeenv==1.9.1
      - packaging==24.2
      - platformdirs==4.3.7
      - pluggy==1.5.0
      - pre-commit==4.2.0
      - pygments==2.19.1
      - pyproject-api==1.9.0
      - pyproject-hooks==1.2.0
      - pytest==8.3.5
      - pytest-cov==6.0.0
      - pyyaml==6.0.2
      - requests==2.32.3
      - six==1.17.0
      - snowballstemmer==2.2.0
      - sphinx==7.4.7
      - sphinx-prompt==1.8.0
      - sphinxcontrib-applehelp==2.0.0
      - sphinxcontrib-devhelp==2.0.0
      - sphinxcontrib-htmlhelp==2.1.0
      - sphinxcontrib-jsmath==1.0.1
      - sphinxcontrib-qthelp==2.0.0
      - sphinxcontrib-serializinghtml==2.0.0
      - tomli==2.2.1
      - tox==4.25.0
      - typing-extensions==4.13.0
      - urllib3==2.3.0
      - virtualenv==20.29.3
      - zipp==3.21.0
prefix: /opt/conda/envs/cti-pattern-validator

stix2patterns/test/v20/test_validator.py::test_pass_patterns[[file:hashes[*] stix2patterns/test/v21/test_validator.py::test_pass_patterns[[file:hashes[*]
stix2patterns/test/v20/test_validator.py::test_spec_patterns[[file:hashes.'SHA-256' stix2patterns/test/v20/test_validator.py::test_spec_patterns[[email-message:from_ref.value stix2patterns/test/v20/test_validator.py::test_spec_patterns[([file:hashes.MD5 stix2patterns/test/v20/test_validator.py::test_spec_patterns[[user-account:account_type stix2patterns/test/v20/test_validator.py::test_spec_patterns[[artifact:mime_type stix2patterns/test/v20/test_validator.py::test_spec_patterns[[file:name stix2patterns/test/v20/test_validator.py::test_spec_patterns[[file:extensions.'windows-pebinary-ext'.sections[*].entropy stix2patterns/test/v20/test_validator.py::test_spec_patterns[[file:mime_type stix2patterns/test/v20/test_validator.py::test_spec_patterns[[network-traffic:dst_ref.type stix2patterns/test/v20/test_validator.py::test_spec_patterns[[domain-name:value stix2patterns/test/v20/test_validator.py::test_spec_patterns[[url:value stix2patterns/test/v20/test_validator.py::test_spec_patterns[[x509-certificate:issuer stix2patterns/test/v20/test_validator.py::test_spec_patterns[[windows-registry-key:key stix2patterns/test/v20/test_validator.py::test_spec_patterns[[(file:name stix2patterns/test/v20/test_validator.py::test_spec_patterns[[email-message:sender_ref.value stix2patterns/test/v20/test_validator.py::test_spec_patterns[[x-usb-device:usbdrive.serial_number stix2patterns/test/v20/test_validator.py::test_spec_patterns[[process:command_line stix2patterns/test/v20/test_validator.py::test_spec_patterns[[network-traffic:dst_ref.value stix2patterns/test/v20/test_validator.py::test_spec_patterns[([file:name stix2patterns/test/v20/test_validator.py::test_spec_patterns[[file:hashes.MD5 stix2patterns/test/v20/test_validator.py::test_spec_patterns[( stix2patterns/test/v20/test_validator.py::test_fail_patterns[file:size stix2patterns/test/v20/test_validator.py::test_fail_patterns[[file:size stix2patterns/test/v20/test_validator.py::test_fail_patterns[[file:hashes.MD5 stix2patterns/test/v20/test_validator.py::test_fail_patterns[[file.size stix2patterns/test/v20/test_validator.py::test_fail_patterns[[file:name stix2patterns/test/v20/test_validator.py::test_fail_patterns[[win-registry-key:key stix2patterns/test/v20/test_validator.py::test_fail_patterns[[network-traffic:dst_ref.value stix2patterns/test/v20/test_validator.py::test_fail_patterns[[x_whatever:detected stix2patterns/test/v20/test_validator.py::test_fail_patterns[[artifact:payload_bin stix2patterns/test/v20/test_validator.py::test_fail_patterns[[foo:bar=1] stix2patterns/test/v20/test_validator.py::test_fail_patterns[[file:hashes.'SHA-256' stix2patterns/test/v20/test_validator.py::test_pass_patterns[[file:size stix2patterns/test/v20/test_validator.py::test_pass_patterns[[file:file_name stix2patterns/test/v20/test_validator.py::test_pass_patterns[[file:extended_properties.'ntfs-ext'.sid stix2patterns/test/v20/test_validator.py::test_pass_patterns[[emailaddr:value stix2patterns/test/v20/test_validator.py::test_pass_patterns[[ipv4addr:value stix2patterns/test/v20/test_validator.py::test_pass_patterns[[user-account:value stix2patterns/test/v20/test_validator.py::test_pass_patterns[[file:file_system_properties.file_name stix2patterns/test/v20/test_validator.py::test_pass_patterns[[network-connection:extended_properties[0].source_payload stix2patterns/test/v20/test_validator.py::test_pass_patterns[[win-registry-key:key stix2patterns/test/v20/test_validator.py::test_pass_patterns[[x_whatever:detected stix2patterns/test/v20/test_validator.py::test_pass_patterns[[artifact:payload_bin stix2patterns/test/v20/test_validator.py::test_pass_patterns[[foo:bar=1] stix2patterns/test/v20/test_validator.py::test_pass_patterns[[network-traffic:start stix2patterns/test/v20/test_validator.py::test_pass_patterns[( stix2patterns/test/v21/test_validator.py::test_spec_patterns[[file:hashes.'SHA-256' stix2patterns/test/v21/test_validator.py::test_spec_patterns[[email-message:from_ref.value stix2patterns/test/v21/test_validator.py::test_spec_patterns[([file:hashes.MD5 stix2patterns/test/v21/test_validator.py::test_spec_patterns[[user-account:account_type stix2patterns/test/v21/test_validator.py::test_spec_patterns[[artifact:mime_type stix2patterns/test/v21/test_validator.py::test_spec_patterns[[file:name stix2patterns/test/v21/test_validator.py::test_spec_patterns[[file:extensions.'windows-pebinary-ext'.sections[*].entropy stix2patterns/test/v21/test_validator.py::test_spec_patterns[[file:mime_type stix2patterns/test/v21/test_validator.py::test_spec_patterns[[network-traffic:dst_ref.type stix2patterns/test/v21/test_validator.py::test_spec_patterns[[domain-name:value stix2patterns/test/v21/test_validator.py::test_spec_patterns[[url:value stix2patterns/test/v21/test_validator.py::test_spec_patterns[[x509-certificate:issuer stix2patterns/test/v21/test_validator.py::test_spec_patterns[[windows-registry-key:key stix2patterns/test/v21/test_validator.py::test_spec_patterns[[(file:name stix2patterns/test/v21/test_validator.py::test_spec_patterns[[email-message:sender_ref.value stix2patterns/test/v21/test_validator.py::test_spec_patterns[[x-usb-device:usbdrive.serial_number stix2patterns/test/v21/test_validator.py::test_spec_patterns[[process:command_line stix2patterns/test/v21/test_validator.py::test_spec_patterns[[network-traffic:dst_ref.value stix2patterns/test/v21/test_validator.py::test_spec_patterns[([file:name stix2patterns/test/v21/test_validator.py::test_spec_patterns[[file:hashes.MD5 stix2patterns/test/v21/test_validator.py::test_fail_patterns[file:size stix2patterns/test/v21/test_validator.py::test_fail_patterns[[file:size stix2patterns/test/v21/test_validator.py::test_fail_patterns[[file:hashes.MD5 stix2patterns/test/v21/test_validator.py::test_fail_patterns[[file.size stix2patterns/test/v21/test_validator.py::test_fail_patterns[[file:name stix2patterns/test/v21/test_validator.py::test_fail_patterns[[win-registry-key:key stix2patterns/test/v21/test_validator.py::test_fail_patterns[[network-traffic:dst_ref.value stix2patterns/test/v21/test_validator.py::test_fail_patterns[[x_whatever:detected stix2patterns/test/v21/test_validator.py::test_fail_patterns[[artifact:payload_bin stix2patterns/test/v21/test_validator.py::test_fail_patterns[[foo:bar=1] stix2patterns/test/v21/test_validator.py::test_fail_patterns[[file:hashes.'SHA-256' stix2patterns/test/v21/test_validator.py::test_fail_patterns[([win-registry-key:key stix2patterns/test/v21/test_validator.py::test_pass_patterns[[file:size stix2patterns/test/v21/test_validator.py::test_pass_patterns[[file:file_name stix2patterns/test/v21/test_validator.py::test_pass_patterns[[file:extended_properties.'ntfs-ext'.sid stix2patterns/test/v21/test_validator.py::test_pass_patterns[[emailaddr:value stix2patterns/test/v21/test_validator.py::test_pass_patterns[[ipv4addr:value stix2patterns/test/v21/test_validator.py::test_pass_patterns[[user-account:value stix2patterns/test/v21/test_validator.py::test_pass_patterns[[file:file_system_properties.file_name stix2patterns/test/v21/test_validator.py::test_pass_patterns[[network-connection:extended_properties[0].source_payload stix2patterns/test/v21/test_validator.py::test_pass_patterns[[win-registry-key:key stix2patterns/test/v21/test_validator.py::test_pass_patterns[[x_whatever:detected stix2patterns/test/v21/test_validator.py::test_pass_patterns[[artifact:payload_bin stix2patterns/test/v21/test_validator.py::test_pass_patterns[[foo:bar=1] stix2patterns/test/v21/test_validator.py::test_pass_patterns[[network-traffic:start stix2patterns/test/v21/test_validator.py::test_pass_patterns[( stix2patterns/test/v21/test_validator.py::test_pass_patterns[([win-registry-key:key stix2patterns/test/v21/test_validator.py::test_pass_patterns[[network-traffic:src_port
stix2patterns/v21/object_validator.py stix2patterns/v20/object_validator.py
stix2patterns/v21/object_validator.py stix2patterns/v20/object_validator.py