[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6AEAC5N212QBXJA89ABEYVV":3,"skill-same:01M6AEAC5N212QBXJA89ABEYVV":111},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":34,"publishedAt":53,"linkOnly":54,"markdownContent":55,"markdownBody":56,"frontMatter":57,"refName":70,"commitSha":71,"skillDirectory":72,"forksCount":73,"repositoryHtmlUrl":74,"repositoryHomepageUrl":75,"ownerHtmlUrl":76,"ownerBlogUrl":77,"ownerDescription":78,"updatedAt":79,"install":80,"resources":93},"01M6AEAC5N212QBXJA89ABEYVV","detecting-broken-object-property-level-authorization",null,"Detect and test for OWASP API3:2023 Broken Object Property Level Authorization (BOPLA), covering excessive data exposure in API responses and mass assignment via injected request-body properties. Use when reviewing API responses\u002Frequests for over-exposed or over-writable object fields, or building detection rules and test cases for property-level authorization gaps that object-level checks miss.","mukul975\u002FAnthropic-Cybersecurity-Skills","mukul975","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F42860185?v=4","01M6ADEQR8T5M4EEG6C67BQCWF","Mahipal","01M6ADJPMYWG1E5GM1FWBE3128",36078,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fdetecting-broken-object-property-level-authorization\u002FSKILL.md",[18,23,26,31],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口",{"categoryNo":27,"categoryName":28,"taxonomyType":29,"taxonomyTypeDesc":30},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",{"categoryNo":32,"categoryName":33,"taxonomyType":29,"taxonomyTypeDesc":30},"01JBSEEDCAT000000000000033","数据分析师",[35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],"authorization","detecting broken object property level authorization","cybersecurity","test","pr","api-security","penetration-testing","data","owasp","testing","detection","bopla","owasp-api3","mass-assignment","excessive-data-exposure","property-level-authorization","api-testing","security","2026-11-10 10:12:30",false,"---\nname: detecting-broken-object-property-level-authorization\ndescription: Detect and test for OWASP API3:2023 Broken Object Property Level Authorization\n  (BOPLA), covering excessive data exposure in API responses and mass assignment via\n  injected request-body properties. Use when reviewing API responses\u002Frequests for\n  over-exposed or over-writable object fields, or building detection rules and test\n  cases for property-level authorization gaps that object-level checks miss.\ndomain: cybersecurity\nsubdomain: api-security\ntags:\n- api-security\n- bopla\n- owasp-api3\n- mass-assignment\n- excessive-data-exposure\n- property-level-authorization\n- api-testing\n- penetration-testing\nversion: '1.0'\nauthor: mahipal\nlicense: Apache-2.0\nnist_csf:\n- PR.PS-01\n- ID.RA-01\n- PR.DS-10\n- DE.CM-01\nmitre_attack:\n- T1190\n- T1213\n- T1212\n---\n\n# Detecting Broken Object Property Level Authorization\n\n## Overview\n\nBroken Object Property Level Authorization (BOPLA), classified as API3:2023 in the OWASP API Security Top 10, combines two related vulnerability classes: Excessive Data Exposure (API returning more data than needed) and Mass Assignment (API accepting more data than intended). Even when APIs enforce object-level authorization correctly, they may fail to control which specific properties of an object a user can read or modify. Attackers exploit this by reading sensitive properties from API responses or injecting additional properties into request bodies to modify fields they should not have access to.\n\n\n## When to Use\n\n- When investigating security incidents that require detecting broken object property level authorization\n- When building detection rules or threat hunting queries for this domain\n- When SOC analysts need structured procedures for this analysis type\n- When validating security monitoring coverage for related attack techniques\n\n## Prerequisites\n\n- Target API with endpoints that return or accept object data\n- API documentation or schema (OpenAPI spec preferred)\n- Burp Suite or Postman for API request manipulation\n- Multiple user accounts with different privilege levels\n- Python 3.8+ with requests library for automated testing\n- Authorization to perform security testing\n\n## Vulnerability Patterns\n\n### Excessive Data Exposure\n\nThe API returns object properties the client does not need:\n\n```json\n\u002F\u002F GET \u002Fapi\u002Fv1\u002Fusers\u002F123\n\u002F\u002F Response includes sensitive fields the UI doesn't display:\n{\n  \"id\": 123,\n  \"username\": \"john_doe\",\n  \"email\": \"john@example.com\",\n  \"name\": \"John Doe\",\n  \"ssn\": \"123-45-6789\",           \u002F\u002F Sensitive - not needed by UI\n  \"salary\": 95000,                 \u002F\u002F Sensitive - not needed by UI\n  \"internal_notes\": \"VIP client\",  \u002F\u002F Internal - should not be exposed\n  \"password_hash\": \"$2b$12...\",    \u002F\u002F Critical - never expose\n  \"role\": \"admin\",                 \u002F\u002F May enable privilege discovery\n  \"created_by\": \"system_admin\",   \u002F\u002F Internal metadata\n  \"credit_card_last4\": \"4242\"     \u002F\u002F PCI compliance violation\n}\n```\n\n### Mass Assignment\n\nThe API binds client-supplied data to internal object properties without filtering:\n\n```http\n\u002F\u002F Normal user update request\nPUT \u002Fapi\u002Fv1\u002Fusers\u002F123\nContent-Type: application\u002Fjson\n\n{\n  \"name\": \"John Updated\",\n  \"email\": \"new@example.com\",\n  \"role\": \"admin\",           \u002F\u002F Attacker-injected: privilege escalation\n  \"is_verified\": true,       \u002F\u002F Attacker-injected: bypass verification\n  \"discount_rate\": 100,      \u002F\u002F Attacker-injected: business logic abuse\n  \"account_balance\": 999999  \u002F\u002F Attacker-injected: financial fraud\n}\n```\n\n## Testing Methodology\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n\"\"\"BOPLA Vulnerability Scanner\n\nTests APIs for Broken Object Property Level Authorization\nincluding Excessive Data Exposure and Mass Assignment.\n\"\"\"\n\nimport requests\nimport json\nimport sys\nfrom typing import Dict, List, Optional, Set\nfrom dataclasses import dataclass, field\nfrom copy import deepcopy\n\n@dataclass\nclass BOPLAFinding:\n    endpoint: str\n    method: str\n    vulnerability_type: str  # \"excessive_exposure\" or \"mass_assignment\"\n    severity: str\n    property_name: str\n    details: str\n\nclass BOPLAScanner:\n    SENSITIVE_PROPERTY_PATTERNS = {\n        \"critical\": [\n            \"password\", \"password_hash\", \"secret\", \"token\", \"api_key\",\n            \"private_key\", \"secret_key\", \"access_token\", \"refresh_token\",\n        ],\n        \"high\": [\n            \"ssn\", \"social_security\", \"tax_id\", \"credit_card\", \"card_number\",\n            \"cvv\", \"bank_account\", \"routing_number\",\n        ],\n        \"medium\": [\n            \"salary\", \"income\", \"internal_notes\", \"admin_notes\",\n            \"created_by\", \"modified_by\", \"ip_address\", \"session_id\",\n            \"role\", \"permissions\", \"is_admin\", \"is_superuser\", \"privilege\",\n        ],\n        \"low\": [\n            \"phone\", \"address\", \"date_of_birth\", \"dob\", \"age\",\n            \"gender\", \"ethnicity\", \"religion\",\n        ]\n    }\n\n    MASS_ASSIGNMENT_FIELDS = [\n        (\"role\", \"admin\"),\n        (\"is_admin\", True),\n        (\"is_verified\", True),\n        (\"is_active\", True),\n        (\"email_verified\", True),\n        (\"account_type\", \"premium\"),\n        (\"discount_rate\", 100),\n        (\"credit_limit\", 999999),\n        (\"permissions\", [\"admin\", \"write\", \"delete\"]),\n        (\"account_balance\", 999999),\n        (\"subscription_tier\", \"enterprise\"),\n        (\"rate_limit\", 999999),\n    ]\n\n    def __init__(self, base_url: str, auth_headers: Dict[str, str]):\n        self.base_url = base_url.rstrip('\u002F')\n        self.auth_headers = auth_headers\n        self.findings: List[BOPLAFinding] = []\n\n    def test_excessive_data_exposure(self, endpoint: str,\n                                      expected_fields: Set[str]) -> List[BOPLAFinding]:\n        \"\"\"Test if API response contains more fields than expected.\"\"\"\n        findings = []\n        url = f\"{self.base_url}{endpoint}\"\n\n        try:\n            response = requests.get(url, headers=self.auth_headers, timeout=10)\n            if response.status_code != 200:\n                return findings\n\n            data = response.json()\n\n            # Handle both single object and list responses\n            objects = data if isinstance(data, list) else [data]\n            if isinstance(data, dict) and \"data\" in data:\n                objects = data[\"data\"] if isinstance(data[\"data\"], list) else [data[\"data\"]]\n\n            for obj in objects[:5]:  # Check first 5 objects\n                if not isinstance(obj, dict):\n                    continue\n\n                response_fields = set(self._flatten_keys(obj))\n                unexpected_fields = response_fields - expected_fields\n\n                for field_name in unexpected_fields:\n                    severity = self._classify_sensitivity(field_name)\n                    if severity:\n                        finding = BOPLAFinding(\n                            endpoint=endpoint,\n                            method=\"GET\",\n                            vulnerability_type=\"excessive_exposure\",\n                            severity=severity,\n                            property_name=field_name,\n                            details=f\"Unexpected sensitive field '{field_name}' in response\"\n                        )\n                        findings.append(finding)\n                        self.findings.append(finding)\n\n        except (requests.exceptions.RequestException, json.JSONDecodeError):\n            pass\n\n        return findings\n\n    def test_mass_assignment(self, endpoint: str, method: str = \"PUT\",\n                              original_data: Optional[dict] = None) -> List[BOPLAFinding]:\n        \"\"\"Test if API accepts and processes additional injected properties.\"\"\"\n        findings = []\n        url = f\"{self.base_url}{endpoint}\"\n\n        # First, get the current object state\n        if original_data is None:\n            try:\n                response = requests.get(url, headers=self.auth_headers, timeout=10)\n                if response.status_code == 200:\n                    original_data = response.json()\n                else:\n                    original_data = {}\n            except (requests.exceptions.RequestException, json.JSONDecodeError):\n                original_data = {}\n\n        # Test each mass assignment field\n        for field_name, injected_value in self.MASS_ASSIGNMENT_FIELDS:\n            if field_name in original_data:\n                # Field exists - test if we can modify it\n                original_value = original_data[field_name]\n                if original_value == injected_value:\n                    continue  # Already has this value\n\n            test_data = deepcopy(original_data)\n            test_data[field_name] = injected_value\n\n            headers = {**self.auth_headers, \"Content-Type\": \"application\u002Fjson\"}\n\n            try:\n                if method == \"PUT\":\n                    response = requests.put(url, json=test_data,\n                                          headers=headers, timeout=10)\n                elif method == \"PATCH\":\n                    response = requests.patch(url, json={field_name: injected_value},\n                                            headers=headers, timeout=10)\n                elif method == \"POST\":\n                    response = requests.post(url, json=test_data,\n                                           headers=headers, timeout=10)\n\n                if response.status_code in (200, 201, 204):\n                    # Verify the field was actually modified\n                    verify_response = requests.get(url, headers=self.auth_headers, timeout=10)\n                    if verify_response.status_code == 200:\n                        updated_data = verify_response.json()\n                        if updated_data.get(field_name) == injected_value:\n                            finding = BOPLAFinding(\n                                endpoint=endpoint,\n                                method=method,\n                                vulnerability_type=\"mass_assignment\",\n                                severity=\"CRITICAL\" if field_name in [\"role\", \"is_admin\", \"permissions\"]\n                                         else \"HIGH\",\n                                property_name=field_name,\n                                details=f\"Successfully injected '{field_name}={injected_value}'\"\n                            )\n                            findings.append(finding)\n                            self.findings.append(finding)\n\n                            # Restore original value if possible\n                            if field_name in original_data:\n                                restore_data = {field_name: original_data[field_name]}\n                                requests.patch(url, json=restore_data,\n                                             headers=headers, timeout=10)\n\n            except requests.exceptions.RequestException:\n                continue\n\n        return findings\n\n    def test_graphql_property_exposure(self, graphql_endpoint: str,\n                                        query: str) -> List[BOPLAFinding]:\n        \"\"\"Test GraphQL APIs for property-level authorization issues.\"\"\"\n        findings = []\n        url = f\"{self.base_url}{graphql_endpoint}\"\n\n        # Introspection query to discover available fields\n        introspection = \"\"\"\n        {\n          __schema {\n            types {\n              name\n              fields {\n                name\n                type { name kind }\n              }\n            }\n          }\n        }\n        \"\"\"\n\n        try:\n            response = requests.post(\n                url,\n                json={\"query\": introspection},\n                headers=self.auth_headers,\n                timeout=10\n            )\n\n            if response.status_code == 200:\n                data = response.json()\n                if \"errors\" not in data:\n                    finding = BOPLAFinding(\n                        endpoint=graphql_endpoint,\n                        method=\"POST\",\n                        vulnerability_type=\"excessive_exposure\",\n                        severity=\"MEDIUM\",\n                        property_name=\"__schema\",\n                        details=\"GraphQL introspection enabled - full schema exposed\"\n                    )\n                    findings.append(finding)\n                    self.findings.append(finding)\n\n        except requests.exceptions.RequestException:\n            pass\n\n        return findings\n\n    def _flatten_keys(self, obj: dict, prefix: str = \"\") -> List[str]:\n        \"\"\"Recursively flatten nested dictionary keys.\"\"\"\n        keys = []\n        for key, value in obj.items():\n            full_key = f\"{prefix}.{key}\" if prefix else key\n            keys.append(full_key)\n            if isinstance(value, dict):\n                keys.extend(self._flatten_keys(value, full_key))\n        return keys\n\n    def _classify_sensitivity(self, field_name: str) -> Optional[str]:\n        \"\"\"Classify the sensitivity level of a field name.\"\"\"\n        lower_name = field_name.lower().split('.')[-1]\n        for severity, patterns in self.SENSITIVE_PROPERTY_PATTERNS.items():\n            for pattern in patterns:\n                if pattern in lower_name:\n                    return severity.upper()\n        return None\n\n    def generate_report(self) -> dict:\n        return {\n            \"total_findings\": len(self.findings),\n            \"by_type\": {\n                \"excessive_exposure\": len([f for f in self.findings\n                                          if f.vulnerability_type == \"excessive_exposure\"]),\n                \"mass_assignment\": len([f for f in self.findings\n                                       if f.vulnerability_type == \"mass_assignment\"]),\n            },\n            \"by_severity\": {\n                \"CRITICAL\": len([f for f in self.findings if f.severity == \"CRITICAL\"]),\n                \"HIGH\": len([f for f in self.findings if f.severity == \"HIGH\"]),\n                \"MEDIUM\": len([f for f in self.findings if f.severity == \"MEDIUM\"]),\n                \"LOW\": len([f for f in self.findings if f.severity == \"LOW\"]),\n            },\n            \"findings\": [\n                {\n                    \"endpoint\": f.endpoint,\n                    \"method\": f.method,\n                    \"type\": f.vulnerability_type,\n                    \"severity\": f.severity,\n                    \"property\": f.property_name,\n                    \"details\": f.details,\n                }\n                for f in self.findings\n            ]\n        }\n```\n\n## Mitigation\n\n```python\n# Server-side: Explicit property allowlists\nclass UserSerializer:\n    # Only expose these fields - never use to_json() or to_dict()\n    PUBLIC_FIELDS = ['id', 'username', 'name', 'avatar_url']\n    OWNER_FIELDS = PUBLIC_FIELDS + ['email', 'phone', 'preferences']\n    ADMIN_FIELDS = OWNER_FIELDS + ['role', 'created_at', 'last_login']\n\n    def serialize(self, user, requesting_user):\n        if requesting_user.is_admin:\n            fields = self.ADMIN_FIELDS\n        elif requesting_user.id == user.id:\n            fields = self.OWNER_FIELDS\n        else:\n            fields = self.PUBLIC_FIELDS\n\n        return {field: getattr(user, field) for field in fields}\n\n# Mass assignment protection - explicit allowlist for writable fields\nWRITABLE_FIELDS = {'name', 'email', 'phone', 'avatar_url', 'preferences'}\n\ndef update_user(user_id, request_data, requesting_user):\n    # Filter out any fields not in the allowlist\n    safe_data = {k: v for k, v in request_data.items() if k in WRITABLE_FIELDS}\n    # Apply updates only with safe data\n    User.objects.filter(id=user_id).update(**safe_data)\n```\n\n## References\n\n- OWASP API3:2023: https:\u002F\u002Fowasp.org\u002FAPI-Security\u002Feditions\u002F2023\u002Fen\u002F0xa3-broken-object-property-level-authorization\u002F\n- Salt Security BOPLA Analysis: https:\u002F\u002Fsalt.security\u002Fblog\u002Fapi3-2023-broken-object-property-level-authorization\n- Wallarm BOPLA Guide: https:\u002F\u002Flab.wallarm.com\u002Fapi32023-broken-object-property-level-authorization\u002F\n- API Security News BOPLA: https:\u002F\u002Fapisecurity.io\u002Fowasp-api-security-top-10\u002Fapi3-2023-broken-object-property-level-authorization\u002F\n- CloudDefense BOPLA: https:\u002F\u002Fwww.clouddefense.ai\u002Fowasp\u002F2023\u002F3\n","# Detecting Broken Object Property Level Authorization\n\n## Overview\n\nBroken Object Property Level Authorization (BOPLA), classified as API3:2023 in the OWASP API Security Top 10, combines two related vulnerability classes: Excessive Data Exposure (API returning more data than needed) and Mass Assignment (API accepting more data than intended). Even when APIs enforce object-level authorization correctly, they may fail to control which specific properties of an object a user can read or modify. Attackers exploit this by reading sensitive properties from API responses or injecting additional properties into request bodies to modify fields they should not have access to.\n\n\n## When to Use\n\n- When investigating security incidents that require detecting broken object property level authorization\n- When building detection rules or threat hunting queries for this domain\n- When SOC analysts need structured procedures for this analysis type\n- When validating security monitoring coverage for related attack techniques\n\n## Prerequisites\n\n- Target API with endpoints that return or accept object data\n- API documentation or schema (OpenAPI spec preferred)\n- Burp Suite or Postman for API request manipulation\n- Multiple user accounts with different privilege levels\n- Python 3.8+ with requests library for automated testing\n- Authorization to perform security testing\n\n## Vulnerability Patterns\n\n### Excessive Data Exposure\n\nThe API returns object properties the client does not need:\n\n```json\n\u002F\u002F GET \u002Fapi\u002Fv1\u002Fusers\u002F123\n\u002F\u002F Response includes sensitive fields the UI doesn't display:\n{\n  \"id\": 123,\n  \"username\": \"john_doe\",\n  \"email\": \"john@example.com\",\n  \"name\": \"John Doe\",\n  \"ssn\": \"123-45-6789\",           \u002F\u002F Sensitive - not needed by UI\n  \"salary\": 95000,                 \u002F\u002F Sensitive - not needed by UI\n  \"internal_notes\": \"VIP client\",  \u002F\u002F Internal - should not be exposed\n  \"password_hash\": \"$2b$12...\",    \u002F\u002F Critical - never expose\n  \"role\": \"admin\",                 \u002F\u002F May enable privilege discovery\n  \"created_by\": \"system_admin\",   \u002F\u002F Internal metadata\n  \"credit_card_last4\": \"4242\"     \u002F\u002F PCI compliance violation\n}\n```\n\n### Mass Assignment\n\nThe API binds client-supplied data to internal object properties without filtering:\n\n```http\n\u002F\u002F Normal user update request\nPUT \u002Fapi\u002Fv1\u002Fusers\u002F123\nContent-Type: application\u002Fjson\n\n{\n  \"name\": \"John Updated\",\n  \"email\": \"new@example.com\",\n  \"role\": \"admin\",           \u002F\u002F Attacker-injected: privilege escalation\n  \"is_verified\": true,       \u002F\u002F Attacker-injected: bypass verification\n  \"discount_rate\": 100,      \u002F\u002F Attacker-injected: business logic abuse\n  \"account_balance\": 999999  \u002F\u002F Attacker-injected: financial fraud\n}\n```\n\n## Testing Methodology\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n\"\"\"BOPLA Vulnerability Scanner\n\nTests APIs for Broken Object Property Level Authorization\nincluding Excessive Data Exposure and Mass Assignment.\n\"\"\"\n\nimport requests\nimport json\nimport sys\nfrom typing import Dict, List, Optional, Set\nfrom dataclasses import dataclass, field\nfrom copy import deepcopy\n\n@dataclass\nclass BOPLAFinding:\n    endpoint: str\n    method: str\n    vulnerability_type: str  # \"excessive_exposure\" or \"mass_assignment\"\n    severity: str\n    property_name: str\n    details: str\n\nclass BOPLAScanner:\n    SENSITIVE_PROPERTY_PATTERNS = {\n        \"critical\": [\n            \"password\", \"password_hash\", \"secret\", \"token\", \"api_key\",\n            \"private_key\", \"secret_key\", \"access_token\", \"refresh_token\",\n        ],\n        \"high\": [\n            \"ssn\", \"social_security\", \"tax_id\", \"credit_card\", \"card_number\",\n            \"cvv\", \"bank_account\", \"routing_number\",\n        ],\n        \"medium\": [\n            \"salary\", \"income\", \"internal_notes\", \"admin_notes\",\n            \"created_by\", \"modified_by\", \"ip_address\", \"session_id\",\n            \"role\", \"permissions\", \"is_admin\", \"is_superuser\", \"privilege\",\n        ],\n        \"low\": [\n            \"phone\", \"address\", \"date_of_birth\", \"dob\", \"age\",\n            \"gender\", \"ethnicity\", \"religion\",\n        ]\n    }\n\n    MASS_ASSIGNMENT_FIELDS = [\n        (\"role\", \"admin\"),\n        (\"is_admin\", True),\n        (\"is_verified\", True),\n        (\"is_active\", True),\n        (\"email_verified\", True),\n        (\"account_type\", \"premium\"),\n        (\"discount_rate\", 100),\n        (\"credit_limit\", 999999),\n        (\"permissions\", [\"admin\", \"write\", \"delete\"]),\n        (\"account_balance\", 999999),\n        (\"subscription_tier\", \"enterprise\"),\n        (\"rate_limit\", 999999),\n    ]\n\n    def __init__(self, base_url: str, auth_headers: Dict[str, str]):\n        self.base_url = base_url.rstrip('\u002F')\n        self.auth_headers = auth_headers\n        self.findings: List[BOPLAFinding] = []\n\n    def test_excessive_data_exposure(self, endpoint: str,\n                                      expected_fields: Set[str]) -> List[BOPLAFinding]:\n        \"\"\"Test if API response contains more fields than expected.\"\"\"\n        findings = []\n        url = f\"{self.base_url}{endpoint}\"\n\n        try:\n            response = requests.get(url, headers=self.auth_headers, timeout=10)\n            if response.status_code != 200:\n                return findings\n\n            data = response.json()\n\n            # Handle both single object and list responses\n            objects = data if isinstance(data, list) else [data]\n            if isinstance(data, dict) and \"data\" in data:\n                objects = data[\"data\"] if isinstance(data[\"data\"], list) else [data[\"data\"]]\n\n            for obj in objects[:5]:  # Check first 5 objects\n                if not isinstance(obj, dict):\n                    continue\n\n                response_fields = set(self._flatten_keys(obj))\n                unexpected_fields = response_fields - expected_fields\n\n                for field_name in unexpected_fields:\n                    severity = self._classify_sensitivity(field_name)\n                    if severity:\n                        finding = BOPLAFinding(\n                            endpoint=endpoint,\n                            method=\"GET\",\n                            vulnerability_type=\"excessive_exposure\",\n                            severity=severity,\n                            property_name=field_name,\n                            details=f\"Unexpected sensitive field '{field_name}' in response\"\n                        )\n                        findings.append(finding)\n                        self.findings.append(finding)\n\n        except (requests.exceptions.RequestException, json.JSONDecodeError):\n            pass\n\n        return findings\n\n    def test_mass_assignment(self, endpoint: str, method: str = \"PUT\",\n                              original_data: Optional[dict] = None) -> List[BOPLAFinding]:\n        \"\"\"Test if API accepts and processes additional injected properties.\"\"\"\n        findings = []\n        url = f\"{self.base_url}{endpoint}\"\n\n        # First, get the current object state\n        if original_data is None:\n            try:\n                response = requests.get(url, headers=self.auth_headers, timeout=10)\n                if response.status_code == 200:\n                    original_data = response.json()\n                else:\n                    original_data = {}\n            except (requests.exceptions.RequestException, json.JSONDecodeError):\n                original_data = {}\n\n        # Test each mass assignment field\n        for field_name, injected_value in self.MASS_ASSIGNMENT_FIELDS:\n            if field_name in original_data:\n                # Field exists - test if we can modify it\n                original_value = original_data[field_name]\n                if original_value == injected_value:\n                    continue  # Already has this value\n\n            test_data = deepcopy(original_data)\n            test_data[field_name] = injected_value\n\n            headers = {**self.auth_headers, \"Content-Type\": \"application\u002Fjson\"}\n\n            try:\n                if method == \"PUT\":\n                    response = requests.put(url, json=test_data,\n                                          headers=headers, timeout=10)\n                elif method == \"PATCH\":\n                    response = requests.patch(url, json={field_name: injected_value},\n                                            headers=headers, timeout=10)\n                elif method == \"POST\":\n                    response = requests.post(url, json=test_data,\n                                           headers=headers, timeout=10)\n\n                if response.status_code in (200, 201, 204):\n                    # Verify the field was actually modified\n                    verify_response = requests.get(url, headers=self.auth_headers, timeout=10)\n                    if verify_response.status_code == 200:\n                        updated_data = verify_response.json()\n                        if updated_data.get(field_name) == injected_value:\n                            finding = BOPLAFinding(\n                                endpoint=endpoint,\n                                method=method,\n                                vulnerability_type=\"mass_assignment\",\n                                severity=\"CRITICAL\" if field_name in [\"role\", \"is_admin\", \"permissions\"]\n                                         else \"HIGH\",\n                                property_name=field_name,\n                                details=f\"Successfully injected '{field_name}={injected_value}'\"\n                            )\n                            findings.append(finding)\n                            self.findings.append(finding)\n\n                            # Restore original value if possible\n                            if field_name in original_data:\n                                restore_data = {field_name: original_data[field_name]}\n                                requests.patch(url, json=restore_data,\n                                             headers=headers, timeout=10)\n\n            except requests.exceptions.RequestException:\n                continue\n\n        return findings\n\n    def test_graphql_property_exposure(self, graphql_endpoint: str,\n                                        query: str) -> List[BOPLAFinding]:\n        \"\"\"Test GraphQL APIs for property-level authorization issues.\"\"\"\n        findings = []\n        url = f\"{self.base_url}{graphql_endpoint}\"\n\n        # Introspection query to discover available fields\n        introspection = \"\"\"\n        {\n          __schema {\n            types {\n              name\n              fields {\n                name\n                type { name kind }\n              }\n            }\n          }\n        }\n        \"\"\"\n\n        try:\n            response = requests.post(\n                url,\n                json={\"query\": introspection},\n                headers=self.auth_headers,\n                timeout=10\n            )\n\n            if response.status_code == 200:\n                data = response.json()\n                if \"errors\" not in data:\n                    finding = BOPLAFinding(\n                        endpoint=graphql_endpoint,\n                        method=\"POST\",\n                        vulnerability_type=\"excessive_exposure\",\n                        severity=\"MEDIUM\",\n                        property_name=\"__schema\",\n                        details=\"GraphQL introspection enabled - full schema exposed\"\n                    )\n                    findings.append(finding)\n                    self.findings.append(finding)\n\n        except requests.exceptions.RequestException:\n            pass\n\n        return findings\n\n    def _flatten_keys(self, obj: dict, prefix: str = \"\") -> List[str]:\n        \"\"\"Recursively flatten nested dictionary keys.\"\"\"\n        keys = []\n        for key, value in obj.items():\n            full_key = f\"{prefix}.{key}\" if prefix else key\n            keys.append(full_key)\n            if isinstance(value, dict):\n                keys.extend(self._flatten_keys(value, full_key))\n        return keys\n\n    def _classify_sensitivity(self, field_name: str) -> Optional[str]:\n        \"\"\"Classify the sensitivity level of a field name.\"\"\"\n        lower_name = field_name.lower().split('.')[-1]\n        for severity, patterns in self.SENSITIVE_PROPERTY_PATTERNS.items():\n            for pattern in patterns:\n                if pattern in lower_name:\n                    return severity.upper()\n        return None\n\n    def generate_report(self) -> dict:\n        return {\n            \"total_findings\": len(self.findings),\n            \"by_type\": {\n                \"excessive_exposure\": len([f for f in self.findings\n                                          if f.vulnerability_type == \"excessive_exposure\"]),\n                \"mass_assignment\": len([f for f in self.findings\n                                       if f.vulnerability_type == \"mass_assignment\"]),\n            },\n            \"by_severity\": {\n                \"CRITICAL\": len([f for f in self.findings if f.severity == \"CRITICAL\"]),\n                \"HIGH\": len([f for f in self.findings if f.severity == \"HIGH\"]),\n                \"MEDIUM\": len([f for f in self.findings if f.severity == \"MEDIUM\"]),\n                \"LOW\": len([f for f in self.findings if f.severity == \"LOW\"]),\n            },\n            \"findings\": [\n                {\n                    \"endpoint\": f.endpoint,\n                    \"method\": f.method,\n                    \"type\": f.vulnerability_type,\n                    \"severity\": f.severity,\n                    \"property\": f.property_name,\n                    \"details\": f.details,\n                }\n                for f in self.findings\n            ]\n        }\n```\n\n## Mitigation\n\n```python\n# Server-side: Explicit property allowlists\nclass UserSerializer:\n    # Only expose these fields - never use to_json() or to_dict()\n    PUBLIC_FIELDS = ['id', 'username', 'name', 'avatar_url']\n    OWNER_FIELDS = PUBLIC_FIELDS + ['email', 'phone', 'preferences']\n    ADMIN_FIELDS = OWNER_FIELDS + ['role', 'created_at', 'last_login']\n\n    def serialize(self, user, requesting_user):\n        if requesting_user.is_admin:\n            fields = self.ADMIN_FIELDS\n        elif requesting_user.id == user.id:\n            fields = self.OWNER_FIELDS\n        else:\n            fields = self.PUBLIC_FIELDS\n\n        return {field: getattr(user, field) for field in fields}\n\n# Mass assignment protection - explicit allowlist for writable fields\nWRITABLE_FIELDS = {'name', 'email', 'phone', 'avatar_url', 'preferences'}\n\ndef update_user(user_id, request_data, requesting_user):\n    # Filter out any fields not in the allowlist\n    safe_data = {k: v for k, v in request_data.items() if k in WRITABLE_FIELDS}\n    # Apply updates only with safe data\n    User.objects.filter(id=user_id).update(**safe_data)\n```\n\n## References\n\n- OWASP API3:2023: https:\u002F\u002Fowasp.org\u002FAPI-Security\u002Feditions\u002F2023\u002Fen\u002F0xa3-broken-object-property-level-authorization\u002F\n- Salt Security BOPLA Analysis: https:\u002F\u002Fsalt.security\u002Fblog\u002Fapi3-2023-broken-object-property-level-authorization\n- Wallarm BOPLA Guide: https:\u002F\u002Flab.wallarm.com\u002Fapi32023-broken-object-property-level-authorization\u002F\n- API Security News BOPLA: https:\u002F\u002Fapisecurity.io\u002Fowasp-api-security-top-10\u002Fapi3-2023-broken-object-property-level-authorization\u002F\n- CloudDefense BOPLA: https:\u002F\u002Fwww.clouddefense.ai\u002Fowasp\u002F2023\u002F3\n",{"name":5,"tags":58,"author":59,"domain":37,"license":15,"version":60,"nist_csf":61,"subdomain":40,"description":7,"mitre_attack":66},[40,46,47,48,49,50,51,41],"mahipal","1.0",[62,63,64,65],"PR.PS-01","ID.RA-01","PR.DS-10","DE.CM-01",[67,68,69],"T1190","T1213","T1212","main","54a798831d2266a3ca61ce68a7acb80b81160d57","skills\u002Fdetecting-broken-object-property-level-authorization",4414,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills","https:\u002F\u002Fmahipal.engineer\u002FAnthropic-Cybersecurity-Skills\u002F","https:\u002F\u002Fgithub.com\u002Fmukul975","Mahipal.engineer","🔐 Cybersecurity | 💻 Dev | 📷 Street Photographer\r\n🎓 MSc | 📚 Research & AI Security","2026-08-31 12:32:44",{"source":8,"skillName":5,"commands":81,"prompt":91,"zipAvailable":92},[82,85,88],{"tool":83,"command":84},"npx","npx skills add mukul975\u002FAnthropic-Cybersecurity-Skills --skill detecting-broken-object-property-level-authorization",{"tool":86,"command":87},"bunx","bunx skills add mukul975\u002FAnthropic-Cybersecurity-Skills --skill detecting-broken-object-property-level-authorization",{"tool":89,"command":90},"pnpm","pnpm dlx skills add mukul975\u002FAnthropic-Cybersecurity-Skills --skill detecting-broken-object-property-level-authorization","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fdetecting-broken-object-property-level-authorization\u002FSKILL.md",true,[94,99,105],{"path":95,"resourceType":95,"resourceTypeDesc":96,"sizeBytes":97,"sourceHtmlUrl":98},"LICENSE","许可证",11255,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fdetecting-broken-object-property-level-authorization\u002FLICENSE",{"path":100,"resourceType":101,"resourceTypeDesc":102,"sizeBytes":103,"sourceHtmlUrl":104},"references\u002Fapi-reference.md","REFERENCE","参考文档",2174,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fdetecting-broken-object-property-level-authorization\u002Freferences\u002Fapi-reference.md",{"path":106,"resourceType":107,"resourceTypeDesc":108,"sizeBytes":109,"sourceHtmlUrl":110},"scripts\u002Fagent.py","SCRIPT","脚本",6557,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fdetecting-broken-object-property-level-authorization\u002Fscripts\u002Fagent.py",[112,139,163,187,212,239],{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":121,"publishedAt":53},"01M6AGDM3HJXTKXX15ZZ0ZVCJ3","verifying-build-provenance-with-slsa-sigstore","Verifies artifact signatures and SLSA provenance using Sigstore's cosign (verify, verify-attestation, verify-blob-attestation) and slsa-verifier (verify-artifact), enforcing keyless OIDC builder identity and source repo against SLSA Build levels. Use in CI\u002FCD before deploying artifacts, when consuming third-party attestations, establishing a SLSA Build L3 pipeline, or confirming provenance during incident response or admission control.","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fverifying-build-provenance-with-slsa-sigstore\u002FSKILL.md",[118],{"categoryNo":119,"categoryName":120,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[122,123,124,125,52,37,126,127,39,128,129,130,131,132,133,134,135,136,137,138],"sigstore","provenance","slsa","verifying build provenance with slsa sigstore","incident response","identity","code","artifacts","ci","supply-chain","pipeline","supply-chain-security","t1195","attestation","code-signing","cosign","keyless",{"skillNo":140,"name":141,"nameZh":6,"description":142,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":143,"categories":144,"keywords":146,"publishedAt":53},"01M6AGDGBPWYVZ2F11GFKJ4HZ9","validating-tpm-measured-boot-attestation","Verifies TPM 2.0 measured-boot integrity and remote attestation with tpm2-tools -- reading PCRs (tpm2_pcrread), replaying the boot event log, generating and checking signed quotes (tpm2_quote\u002Ftpm2_checkquote), and sealing secrets to a PCR policy. Use to confirm a system booted trusted firmware\u002Fkernel for Zero Trust device posture, detect boot-chain tampering via PCR drift, or build a golden-value baseline for fleet attestation.","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fvalidating-tpm-measured-boot-attestation\u002FSKILL.md",[145],{"categoryNo":119,"categoryName":120,"taxonomyType":21,"taxonomyTypeDesc":22},[147,135,148,149,52,150,37,39,151,152,153,154,155,156,157,158,159,160,161,162],"boot","TPM","validating tpm measured boot attestation","policy","verification","ZeRO","firmware","Tools","measured-boot","PCR","integrity","secrets","remote-attestation","tpm2-tools","integrity-verification","trusted-computing",{"skillNo":164,"name":165,"nameZh":6,"description":166,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":167,"categories":168,"keywords":171,"publishedAt":53},"01M6AGDCW0Y4FXZ3362GT1941M","validating-backup-integrity-for-recovery","Validates backup integrity through cryptographic hash verification, automated restore testing, corruption detection, and recoverability checks to confirm backups are reliable for disaster recovery and ransomware response. Use before relying on backups for recovery, when building post-backup validation pipelines, auditing backup infrastructure for compliance, or checking immutable\u002Fair-gapped backups for silent corruption or tampering.","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fvalidating-backup-integrity-for-recovery\u002FSKILL.md",[169,170],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":119,"categoryName":120,"taxonomyType":21,"taxonomyTypeDesc":22},[157,172,173,174,44,37,175,176,151,177,178,179,180,181,45,182,183,184,185,186],"backup","recovery","validating backup integrity for recovery","infrastructure","validation","compliance","hash-verification","incident-response","ransomware","cryptocurrency","t1078","t1490","immutable","disaster-recovery","restore-testing",{"skillNo":188,"name":189,"nameZh":6,"description":190,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":191,"categories":192,"keywords":194,"publishedAt":53},"01M6AGD9GBG2KZ336AE763J3WH","triaging-windows-with-kape","Runs KAPE (Kroll Artifact Parser and Extractor) to collect targeted forensic artifacts (registry hives, $MFT, event logs, prefetch, browser data) via Targets and parse them with Modules wrapping Eric Zimmerman's EZ Tools (PECmd, MFTECmd, RECmd). Use during early incident containment\u002Ftriage when full disk imaging is impractical but a defensible, parseable Windows artifact set is needed quickly, including at-scale remote collection.","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Ftriaging-windows-with-kape\u002FSKILL.md",[193],{"categoryNo":119,"categoryName":120,"taxonomyType":21,"taxonomyTypeDesc":22},[195,196,197,37,198,199,200,201,202,203,204,42,205,206,207,208,154,209,210,211],"windows","kape","triaging windows with kape","registry","browser","logs","windows-forensics","dfir","mft","mftecmd","prefetch","eric-zimmerman","digital-forensics","SET","collection","pecmd","artifact-collection",{"skillNo":213,"name":214,"nameZh":6,"description":215,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":216,"categories":217,"keywords":219,"publishedAt":53},"01M6AGD5PW5J4EVZM958WD74ZQ","triaging-vulnerabilities-with-ssvc-framework","Triages and prioritizes vulnerabilities with CISA's Stakeholder-Specific Vulnerability Categorization (SSVC) decision tree, weighing exploitation status (via the CISA KEV catalog and FIRST EPSS API), technical impact, automatability, and mission prevalence to output Track\u002FTrack*\u002FAttend\u002FAct decisions. Use when prioritizing vulnerability scan results (OpenVAS, Nessus, Qualys) for remediation planning beyond raw CVSS scores.","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Ftriaging-vulnerabilities-with-ssvc-framework\u002FSKILL.md",[218],{"categoryNo":119,"categoryName":120,"taxonomyType":21,"taxonomyTypeDesc":22},[220,221,222,37,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238],"vulnerabilities","framework","triaging vulnerabilities with ssvc framework","status","planning","CISA","vulnerability-management","risk-management","nessus","qualys","openvas","cvss","remediation","risk","vulnerability","api","prioritization","ssvc","decision-tree",{"skillNo":240,"name":241,"nameZh":6,"description":242,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":243,"categories":244,"keywords":246,"publishedAt":53},"01M6AGD24TTQQM4CXG69E3B9TJ","triaging-security-incident","Performs initial triage of security incidents using the NIST SP 800-61r3 and SANS PICERL frameworks, classifying incident type, assigning priority by business impact, and routing to the appropriate response team. Use when a SIEM\u002FEDR alert needs human classification, concurrent alerts must be prioritized, or a user report or threat-intel IOC match requires initial incident categorization.","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Ftriaging-security-incident\u002FSKILL.md",[245],{"categoryNo":119,"categoryName":120,"taxonomyType":21,"taxonomyTypeDesc":22},[52,247,37,248,249,250,251,252,253,254,255,182,256,183,257,258,259,260,261,262],"triaging security incident","siem","file","ioc","soc","NIST-800-61","NIST","severity","edr","execution","analysis","classification","severity-classification","incident-triage","SANS-PICERL","SOC-operations"]