CWE-495
AllowedPrivate Data Structure Returned From A Public Method
Abstraction: Variant · Status: Draft
The product has a method that is declared public, but returns a reference to a private data structure, which could then be modified in unexpected ways.
2 vulnerabilities reference this CWE, most recent first.
CVE-2025-29868 (GCVE-0-2025-29868)
Vulnerability from cvelistv5 – Published: 2025-04-01 07:56 – Updated: 2025-04-10 15:03- CWE-495 - Private Data Structure Returned From A Public Method
| Vendor | Product | Version | |
|---|---|---|---|
| Apache Software Foundation | Apache Answer |
Affected:
0 , ≤ 1.4.2
(semver)
|
{
"containers": {
"adp": [
{
"metrics": [
{
"cvssV3_1": {
"attackComplexity": "LOW",
"attackVector": "NETWORK",
"availabilityImpact": "NONE",
"baseScore": 6.5,
"baseSeverity": "MEDIUM",
"confidentialityImpact": "LOW",
"integrityImpact": "LOW",
"privilegesRequired": "NONE",
"scope": "UNCHANGED",
"userInteraction": "NONE",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N",
"version": "3.1"
}
},
{
"other": {
"content": {
"id": "CVE-2025-29868",
"options": [
{
"Exploitation": "none"
},
{
"Automatable": "no"
},
{
"Technical Impact": "partial"
}
],
"role": "CISA Coordinator",
"timestamp": "2025-04-01T18:43:08.062075Z",
"version": "2.0.3"
},
"type": "ssvc"
}
}
],
"providerMetadata": {
"dateUpdated": "2025-04-01T18:43:33.714Z",
"orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"shortName": "CISA-ADP"
},
"title": "CISA ADP Vulnrichment"
},
{
"providerMetadata": {
"dateUpdated": "2025-04-10T15:03:07.021Z",
"orgId": "af854a3a-2127-422b-91ae-364da2661108",
"shortName": "CVE"
},
"references": [
{
"url": "http://www.openwall.com/lists/oss-security/2025/04/01/2"
},
{
"url": "http://www.openwall.com/lists/oss-security/2025/04/02/1"
},
{
"url": "http://www.openwall.com/lists/oss-security/2025/04/10/3"
}
],
"title": "CVE Program Container"
}
],
"cna": {
"affected": [
{
"defaultStatus": "unaffected",
"product": "Apache Answer",
"vendor": "Apache Software Foundation",
"versions": [
{
"lessThanOrEqual": "1.4.2",
"status": "affected",
"version": "0",
"versionType": "semver"
}
]
}
],
"credits": [
{
"lang": "en",
"type": "reporter",
"value": "Hamed Kohi"
},
{
"lang": "en",
"type": "reporter",
"value": "Luke Smith"
}
],
"descriptions": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/html",
"value": "\u003cp\u003ePrivate Data Structure Returned From A Public Method vulnerability in Apache Answer.\u003c/p\u003e\u003cp\u003eThis issue affects Apache Answer: through 1.4.2.\u003c/p\u003eIf a user uses an externally referenced image, when a user accesses this image, the provider of the image may obtain private information about the ip address of that accessing user.\u003cbr\u003e\u003cp\u003eUsers are recommended to upgrade to version 1.4.5, which fixes the issue.\u0026nbsp;In the new version, administrators can set whether external content can be displayed.\u003c/p\u003e"
}
],
"value": "Private Data Structure Returned From A Public Method vulnerability in Apache Answer.\n\nThis issue affects Apache Answer: through 1.4.2.\n\nIf a user uses an externally referenced image, when a user accesses this image, the provider of the image may obtain private information about the ip address of that accessing user.\nUsers are recommended to upgrade to version 1.4.5, which fixes the issue.\u00a0In the new version, administrators can set whether external content can be displayed."
}
],
"metrics": [
{
"other": {
"content": {
"text": "low"
},
"type": "Textual description of severity"
}
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-495",
"description": "CWE-495 Private Data Structure Returned From A Public Method",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2025-04-01T07:56:28.633Z",
"orgId": "f0158376-9dc2-43b6-827c-5f631a4d8d09",
"shortName": "apache"
},
"references": [
{
"tags": [
"vendor-advisory"
],
"url": "https://lists.apache.org/thread/l7pohw5g03g3qsvrz8pqc9t29mdv5lhf"
}
],
"source": {
"discovery": "EXTERNAL"
},
"title": "Apache Answer: Using externally referenced images can leak user privacy.",
"x_generator": {
"engine": "Vulnogram 0.2.0"
}
}
},
"cveMetadata": {
"assignerOrgId": "f0158376-9dc2-43b6-827c-5f631a4d8d09",
"assignerShortName": "apache",
"cveId": "CVE-2025-29868",
"datePublished": "2025-04-01T07:56:28.633Z",
"dateReserved": "2025-03-12T07:04:55.206Z",
"dateUpdated": "2025-04-10T15:03:07.021Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.1"
}
GHSA-WQCC-MFHW-53PC
Vulnerability from github – Published: 2025-04-01 09:30 – Updated: 2025-04-10 22:59Private Data Structure Returned From A Public Method vulnerability in Apache Answer.
This issue affects Apache Answer: through 1.4.2.
If a user uses an externally referenced image, when a user accesses this image, the provider of the image may obtain private information about the ip address of that accessing user. Users are recommended to upgrade to version 1.4.5, which fixes the issue. In the new version, administrators can set whether external content can be displayed.
{
"affected": [
{
"package": {
"ecosystem": "Go",
"name": "github.com/apache/answer"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.4.5"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2025-29868"
],
"database_specific": {
"cwe_ids": [
"CWE-495"
],
"github_reviewed": true,
"github_reviewed_at": "2025-04-01T18:20:03Z",
"nvd_published_at": "2025-04-01T08:15:14Z",
"severity": "LOW"
},
"details": "Private Data Structure Returned From A Public Method vulnerability in Apache Answer.\n\nThis issue affects Apache Answer: through 1.4.2.\n\nIf a user uses an externally referenced image, when a user accesses this image, the provider of the image may obtain private information about the ip address of that accessing user.\nUsers are recommended to upgrade to version 1.4.5, which fixes the issue.\u00a0In the new version, administrators can set whether external content can be displayed.",
"id": "GHSA-wqcc-mfhw-53pc",
"modified": "2025-04-10T22:59:22Z",
"published": "2025-04-01T09:30:20Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-29868"
},
{
"type": "WEB",
"url": "https://github.com/apache/answer/issues/1250"
},
{
"type": "PACKAGE",
"url": "https://github.com/apache/answer"
},
{
"type": "WEB",
"url": "https://lists.apache.org/thread/l7pohw5g03g3qsvrz8pqc9t29mdv5lhf"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2025/04/01/2"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2025/04/02/1"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2025/04/10/3"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:U",
"type": "CVSS_V4"
}
],
"summary": "Apache Answer User Using External Images Potentially Discloses User Information"
}
Mitigation
Declare the method private.
Mitigation
Clone the member data and keep an unmodified version of the data private to the object.
Mitigation
Use public setter methods that govern how a private member can be modified.
No CAPEC attack patterns related to this CWE.